org.mentawai.core
Class PrettyURLController

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.mentawai.core.Controller
              extended by org.mentawai.core.PrettyURLController
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class PrettyURLController
extends Controller

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mentawai.core.Controller
appContext
 
Constructor Summary
PrettyURLController()
           
 
Method Summary
protected  java.lang.String getActionName(javax.servlet.http.HttpServletRequest req)
          From the http request, get the action name.
protected  java.lang.String getInnerActionName(javax.servlet.http.HttpServletRequest req)
          The action name may include an Inner Action.
 void init(javax.servlet.ServletConfig conf)
          Initialize the Controller, creating and starting the ApplicationManager.
protected  void prepareAction(Action action, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Subclasses of this controller may override this method to have a chance to prepare the action before it is executed.
 
Methods inherited from class org.mentawai.core.Controller
destroy, getApplication, getURI, invokeAction, service, setAppManager, setConsequenceProvider
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
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

PrettyURLController

public PrettyURLController()
Method Detail

init

public void init(javax.servlet.ServletConfig conf)
          throws javax.servlet.ServletException
Description copied from class: Controller
Initialize the Controller, creating and starting the ApplicationManager.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class Controller
Parameters:
conf - the ServletConfig.
Throws:
javax.servlet.ServletException

getActionName

protected java.lang.String getActionName(javax.servlet.http.HttpServletRequest req)
Description copied from class: Controller
From the http request, get the action name. You may override this if you want to extract the action name through some other way.

Overrides:
getActionName in class Controller
Parameters:
req - The http request
Returns:
The action name

getInnerActionName

protected java.lang.String getInnerActionName(javax.servlet.http.HttpServletRequest req)
Description copied from class: Controller
The action name may include an Inner Action. For example: for bookmanager.add.mtw the action name is "bookmanager" and the inneraction name is "add". If you want to extract the inner action through some other way you can override this method in your own controller.

Overrides:
getInnerActionName in class Controller
Returns:
The inner action name or null if there is no inneraction.

prepareAction

protected void prepareAction(Action action,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
Description copied from class: Controller
Subclasses of this controller may override this method to have a chance to prepare the action before it is executed. This method creates and injects in the action all contexts, input, output and locale.

Overrides:
prepareAction in class Controller
Parameters:
action - The action to prepare for execution
req - The http request (input will need that)
res - The http response (output will need that)


Copyright © 2005 Mentawai Team. All Rights Reserved.