com.arsdigita.web
Class InternalPrefixerServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.arsdigita.web.InternalPrefixerServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class InternalPrefixerServlet
extends javax.servlet.http.HttpServlet

Allow arbitrary prefixes to be set up in web.xml such as /textonly, /printer, /debug, etc. This enables the entire site to be switched to alternative modes of operation e.g., completely switching to an alternative set of stylesheets. For example,

 <servlet>
   <servlet-name>TextOnlyServlet</servlet-name>
   <display-name>Text Only Servlet</display-name>
   <servlet-class>
    com.arsdigita.web.InternalPrefixerServlet
   </servlet-class>
   <init-param>
    <param-name>prefix</param-name>
    <param-value>/text</param-value>
  </init-param>
 </servlet>

 <servlet-mapping>
    <servlet-name>TextOnlyServlet</servlet-name>
    <url-pattern>/textonly/*</url-pattern>
 </servlet-mapping>
 
The above entry, in conjunction with a set of stylesheets that producedtext only output, would enable a text only part of the site with a /textonly/ URL prefix.

See Also:
Serialized Form

Constructor Summary
InternalPrefixerServlet()
           
 
Method Summary
 void init()
           
protected  void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalPrefixerServlet

public InternalPrefixerServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

service

protected void service(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)
                throws javax.servlet.ServletException,
                       IOException
Throws:
javax.servlet.ServletException
IOException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC