String query = req.getParameter("query");
if (query != null) {
IndexPathBean path = new IndexPathBean();
//path.setContext(getServletContext());
QueryBean queryBean = new QueryBean(path.getIndexPath(), req.getParameter("query"));
try {
queryBean.execute();
} catch (ParseException e) {
throw new Error("Unable to parse query: " + queryBean.getQuery());
}
req.setAttribute("luceneQueryBean", queryBean);
}
RequestDispatcher d = req.getRequestDispatcher("/SiteSearch.jsp");
d.forward(req, resp);