coreservlets
Class SearchEngines
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--coreservlets.SearchEngines
- public class SearchEngines
- extends HttpServlet
Servlet that takes a search string, number of results per
page, and a search engine name, sending the query to
that search engine. Illustrates manipulating
the response status line. It sends a 302 response
(via sendRedirect) if it gets a known search engine,
and sends a 404 response (via sendError) otherwise.
Taken from Core Servlets and JavaServer Pages
from Prentice Hall and Sun Microsystems Press,
http://www.coreservlets.com/.
© 2000 Marty Hall; may be freely used or adapted.
- See Also:
- Serialized Form
| Methods inherited from class javax.servlet.GenericServlet |
destroy,
getInitParameter,
getInitParameterNames,
getServletConfig,
getServletContext,
getServletInfo,
getServletName,
init,
init,
log,
log |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SearchEngines
public SearchEngines()
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
- doGet in class HttpServlet
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
- doPost in class HttpServlet
 |
|---|
| CSAJSP @ amazon.com |
|---|