.getParameter("page"));
} catch (Exception e) {
page = 1;
}
log.warning("----------Key-------" + keyword);
NewsSearchModel model = new NewsSearchModel();
model.setPage(page);
model.search(keyword);
CompiledScript compiledscript = CompileScriptEngine
.getCompileScript(config.getApplicationId(),
"search", template.getSearch());
Bindings bind = compiledscript.getEngine().getBindings(
ScriptContext.ENGINE_SCOPE);
bind.put("title_for_layout", config.getTitle());
bind.put("description_for_layout", config.getDescription());
bind.put("keyword_for_layout", config.getKeyword());
bind.put("css_for_layout", template.getCss());
bind.put("js_for_layout", template.getJs());
CategoryModel cateModel = new CategoryModel();
cateModel.prepareAll();
TagModel tagModel = new TagModel();
tagModel.prepareList();
bind.put("keyword", keyword);
bind.put("recent_view", RecentViewHelper.getRecentView());
bind.put("list_tag", tagModel.getListResult());
bind.put("list_category", cateModel.getListResult());
bind.put("current_page", model.getPage());
bind.put("total_page", model.getTotalPage());
bind.put("articles", model.getListResult());
try {
resp.getWriter().print((String) compiledscript.eval());
} catch (Exception e) {
e.printStackTrace();
log.warning(e.toString());