org.objectweb.jonas.webapp.jadmin.servlet
Class InitialServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.velocity.servlet.VelocityServlet
org.objectweb.jonas.webapp.jadmin.servlet.JadminServlet
org.objectweb.jonas.webapp.jadmin.servlet.InitialServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class InitialServlet
- extends JadminServlet
This is the initial servlet called by the Jadmin application.
- Author:
- Adriana Danes
- See Also:
- Serialized Form
Fields inherited from class org.apache.velocity.servlet.VelocityServlet |
CONTENT_TYPE, DEFAULT_CONTENT_TYPE, DEFAULT_OUTPUT_ENCODING, INIT_PROPS_KEY, REQUEST, RESPONSE |
Method Summary |
org.apache.velocity.Template |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.velocity.context.Context context)
Main routine to handle a request. |
protected java.util.Properties |
loadConfiguration(javax.servlet.ServletConfig config)
Load the velocity configuratio. |
Methods inherited from class org.apache.velocity.servlet.VelocityServlet |
doGet, doPost, doRequest, error, getTemplate, getTemplate, handleRequest, mergeTemplate, requestCleanup, setContentType |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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 |
InitialServlet
public InitialServlet()
loadConfiguration
protected java.util.Properties loadConfiguration(javax.servlet.ServletConfig config)
throws java.io.IOException,
java.io.FileNotFoundException
- Load the velocity configuratio. Called by the VelocityServlet init().
We set some properties so that Velocity templates will loaded from a directory
called "templates" under the Jadmin web application installation directory
(i.e. under ../wabapps/jadmin/templates, where jadmin is name of the war containing
the web application).
- Parameters:
config
- the ServletConfig object passed to the servlet by the servlet container
- Returns:
- java.util.Properties loaded with the Velocity configuration parameters
- Throws:
java.io.IOException
- I/O problem accessing the Velocity configuration file
java.io.FileNotFoundException
- if the Velocity configuration file not found
handleRequest
public org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.velocity.context.Context context)
Main routine to handle a request. Called by
VelocityServlet, your responsibility as programmer
is to simply return a valid Template
- Parameters:
request
- request treated by the servletresponse
- response returned by the servletcontext
- a Velocity Context object to be filled with
data. Will be used for rendering this
template
- Returns:
- Template to be used for request