com.atlassian.jira.web.dispatcher
Class JiraServletDispatcher

java.lang.Object
  extended byHttpServlet
      extended bycom.atlassian.jira.web.dispatcher.JiraServletDispatcher

public class JiraServletDispatcher
extends HttpServlet

Main dispatcher servlet. It works in three phases: first propagate all parameters to the command JavaBean. Second, call execute() to let the JavaBean create the result data. Third, delegate to the JSP that corresponds to the result state that was chosen by the JavaBean. The command JavaBeans can be found in a package prefixed with either of the package names in the comma-separated "packages" servlet init parameter.

Version:
$Revision: 1.5 $
Author:
Rickard ???berg (rickard@middleware-company.com), Matt Baldree (matt@smallleap.com)
See Also:
Serialized Form

Field Summary
static java.lang.String CLEANUP
           
static java.lang.String GD
           
protected static Log log
           
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
JiraServletDispatcher()
           
 
Method Summary
protected  java.lang.String getHTMLErrorMessage(java.lang.Throwable t)
          Return an HTML error message for the throwable
 void init(ServletConfig config)
          Initialize dispatcher servlet
 void service(HttpServletRequest aRequest, HttpServletResponse aResponse)
          Service a request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Log log

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

JiraServletDispatcher

public JiraServletDispatcher()
Method Detail

init

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

Parameters:
config -
Throws:
ServletException

service

public void service(HttpServletRequest aRequest,
                    HttpServletResponse aResponse)
             throws 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.

Parameters:
aRequest -
aResponse -
Throws:
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