org.mmbase.servlet
Class servjumpers

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.mmbase.servlet.MMBaseServlet
              extended byorg.mmbase.servlet.JamesServlet
                  extended byorg.mmbase.servlet.servjumpers
All Implemented Interfaces:
org.mmbase.servlet.MMBaseStarter, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class servjumpers
extends JamesServlet

Servjumpers filters all url's to see if it has a jumper (specified in the jumpers builder). If a jumper is found, it will redirect the jumper to the designation url.

Version:
$Id: servjumpers.java,v 1.18 2004/03/03 15:18:32 michiel Exp $
Author:
Daniel Ockeloen
See Also:
JumpersFilter, Serialized Form
Warning: Will be renamed to:
Servjumpers

Field Summary
 
Fields inherited from class org.mmbase.servlet.JamesServlet
pageLog
 
Fields inherited from class org.mmbase.servlet.MMBaseServlet
mmbase
 
Constructor Summary
servjumpers()
           
 
Method Summary
protected  java.lang.String getUrl(java.lang.String key)
          Retrieve an alternate url based on a jumper key.
 void init()
          Initializes the servlet.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Service call for filtering.
 
Methods inherited from class org.mmbase.servlet.JamesServlet
getAddress, getAuthorization, getAuthorization, getCookie, getInitParameters, getModule, getParam, getParamVector, getProperties, getProperty
 
Methods inherited from class org.mmbase.servlet.MMBaseServlet
associateMapping, decRefCount, destroy, doGet, getAssociations, getMMBase, getRequestURL, getServletByAssociation, getServletByMapping, getServletInfo, getServletMappings, getServletMappingsByAssociation, incRefCount, setInitException, setMMBase
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

servjumpers

public servjumpers()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Description copied from class: JamesServlet
Initializes the servlet.

Overrides:
init in class JamesServlet
Throws:
javax.servlet.ServletException

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws javax.servlet.ServletException,
                    java.io.IOException
Service call for filtering. Will be called by the server when a request is done by a user. Determines an url based on a jumper key, provided the original url (reclaimed from the request) is NOT a directory root and NOT a fully specified file.
So '/mypath/' or '/myfile.html' will not be filtered, but '/mypath' will.

Overrides:
service in class MMBaseServlet
Parameters:
req - The HTTP Servlet request
res - The HTTP Servlet response
Throws:
javax.servlet.ServletException
java.io.IOException

getUrl

protected java.lang.String getUrl(java.lang.String key)
Retrieve an alternate url based on a jumper key.

Parameters:
key - the jumper key (original url specified)
Returns:
the alternate yurl, or null if no url was found.


MMBase build 1.7.1.20041002