com.atlassian.jira.web.dispatcher
Class JiraWebworkActionDispatcher

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JiraWebworkActionDispatcher
extends javax.servlet.http.HttpServlet

This is the servlet that invokes WebWork actions and then dispatches to their appropriate view.

This servlet is one of the key planks of JIRA architecture.

This code was copied from the webwork ServletDispatcher originally and has since diverted some what for JIRA purposes. We no longer share any code.

See Also:
Serialized Form

Field Summary
static java.lang.String CLEANUP
           
static java.lang.String GD
           
static java.lang.String STACK_HEAD
          After a view is processed the value of the stack's head is put into the request attributes with this key.
 
Constructor Summary
JiraWebworkActionDispatcher()
           
 
Method Summary
protected  java.lang.String getHTMLErrorMessage(java.lang.Throwable t)
          Return an HTML error message for the throwable
 void init(javax.servlet.ServletConfig config)
          Initialize dispatcher servlet
 void service(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
          Service a request.
 
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
 

Field Detail

STACK_HEAD

public static final java.lang.String STACK_HEAD
After a view is processed the value of the stack's head is put into the request attributes with this key.

See Also:
Constant Field Values

GD

public static final java.lang.String GD
See Also:
Constant Field Values

CLEANUP

public static final java.lang.String CLEANUP
See Also:
Constant Field Values
Constructor Detail

JiraWebworkActionDispatcher

public JiraWebworkActionDispatcher()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize dispatcher servlet

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - ServletConfig
Throws:
javax.servlet.ServletException

service

public void service(javax.servlet.http.HttpServletRequest httpServletRequest,
                    javax.servlet.http.HttpServletResponse httpServletResponse)
             throws javax.servlet.ServletException
Service a request. The request is first checked to see if it is a multi-part. If it is, then the request is wrapped so WW will be able to work with the multi-part as if it was a normal request. Next, we will process all actions until an action returns a non-action which is usually a view. For each action in a chain, the action's context will be first set and then the action will be instantiated. Next, the previous action if this action isn't the first in the chain will have its attributes copied to the current action.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
httpServletRequest - HttpServletRequest
httpServletResponse - HttpServletResponse
Throws:
javax.servlet.ServletException

getHTMLErrorMessage

protected java.lang.String getHTMLErrorMessage(java.lang.Throwable t)
Return an HTML error message for the throwable

Parameters:
t - Throwable
Returns:
A String with an error message


Copyright © 2002-2010 Atlassian. All Rights Reserved.