com.raritantechnologies.quickstart.userInterface
Class SearchServlet

java.lang.Object
  extended byHttpServlet
      extended bycom.raritantechnologies.quickstart.userInterface.SearchServlet

public class SearchServlet
extends HttpServlet

Wraps an IServletHandler - provides a Configurable SearchServlet.

The ServletHandler is linked to the SearchServlet by the following configurations in web.xml and in the framework Configuration XML. The web.xml configuration utilizes the init-param tag to specify the name of the ServletHandler which is in turn configured as a SystemObject in the application configuration XML.

web.xml configuration:
  <servlet>
    <servlet-name>[ servlet name - e.g. 'SearchServlet' ]</servlet-name>
    <servlet-class>com.raritantechnologies.quickstart.userInterface.SearchServlet

    <init-param>
      <param-name>ServletHandler</param-name>
      <param-value>[ name of ServletHandler here - matches name in SystemObject configuration ]</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name[ servlet name - e.g. 'SearchServlet' ]</servlet-name>
    <url-pattern>[ servlet handler URL Pattern ]</url-pattern>
  </servlet-mapping>
 
XML Configuration Template:
   <SystemObject type="ServletHandler" name="[ name of servlet handler - matches param-value in init-param ]" 
                    class="[ class of com.raritantechnologies.quickstart.userInterface.IServletHandler ]" >

   </SystemObject>

 

See Also:
Serialized Form

Constructor Summary
SearchServlet()
           
 
Method Summary
 void init()
           
 void service(HttpServletRequest pReq, HttpServletResponse pRes)
          Delegate the service request to the IServletHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchServlet

public SearchServlet()
Method Detail

init

public void init()
          throws ServletException
Throws:
ServletException

service

public void service(HttpServletRequest pReq,
                    HttpServletResponse pRes)
             throws ServletException,
                    java.io.IOException
Delegate the service request to the IServletHandler.

Throws:
a - ServletException if the IServletHandler is not defined.
ServletException
java.io.IOException