FileDocCategorySizeDatePackage
SiteSearch.javaAPI DocExample1280Mon Feb 23 22:53:06 GMT 2004com.develop.ss.web

SiteSearch

public class SiteSearch extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)

    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);