Java Doc for RequestProcessor.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » action » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » struts 1.3.8 » org.apache.struts.action 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.action.RequestProcessor

All known Subclasses:   org.apache.struts.faces.application.FacesRequestProcessor,  org.apache.struts.chain.ComposableRequestProcessor,  org.apache.struts.tiles.TilesRequestProcessor,
RequestProcessor
public class RequestProcessor (Code)

RequestProcessor contains the processing logic that the ActionServlet performs as it receives each servlet request from the container. You can customize the request processing behavior by subclassing this class and overriding the method(s) whose behavior you are interested in changing.


version:
   $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
since:
   Struts 1.1


Field Summary
final public static  StringINCLUDE_PATH_INFO
    
final public static  StringINCLUDE_SERVLET_PATH
    
protected  HashMapactions
    
protected static  Loglog
    
protected  ModuleConfigmoduleConfig
    
protected  ActionServletservlet
    


Method Summary
public  voiddestroy()
    
protected  voiddoForward(String uri, HttpServletRequest request, HttpServletResponse response)
    

Do a forward to specified URI using a RequestDispatcher.

protected  voiddoInclude(String uri, HttpServletRequest request, HttpServletResponse response)
    

Do an include of specified URI using a RequestDispatcher.

protected  MessageResourcesgetInternal()
    
protected  ServletContextgetServletContext()
    
public  voidinit(ActionServlet servlet, ModuleConfig moduleConfig)
    
protected  voidinternalModuleRelativeForward(String uri, HttpServletRequest request, HttpServletResponse response)
    

Do a module relative forward to specified URI using request dispatcher.

protected  voidinternalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response)
    

Do a module relative include to specified URI using request dispatcher.

public  voidprocess(HttpServletRequest request, HttpServletResponse response)
    
protected  ActionprocessActionCreate(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
    
protected  ActionFormprocessActionForm(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
    

Retrieve and return the ActionForm associated with this mapping, creating and retaining one if necessary.

protected  ActionForwardprocessActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping)
    

Ask the specified Action instance to handle this request.

protected  voidprocessCachedMessages(HttpServletRequest request, HttpServletResponse response)
    

Removes any ActionMessages object stored in the session under Globals.MESSAGE_KEY and Globals.ERROR_KEY if the messages' isAccessed method returns true.

protected  voidprocessContent(HttpServletRequest request, HttpServletResponse response)
    

Set the default content type (with optional character encoding) for all responses if requested.

protected  ActionForwardprocessException(HttpServletRequest request, HttpServletResponse response, Exception exception, ActionForm form, ActionMapping mapping)
    

Ask our exception handler to handle the exception.

protected  booleanprocessForward(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
    

Process a forward requested by this mapping (if any).

protected  voidprocessForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward)
    

Forward or redirect to the specified destination, by the specified mechanism.

protected  booleanprocessInclude(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
    

Process an include requested by this mapping (if any).

protected  voidprocessLocale(HttpServletRequest request, HttpServletResponse response)
    

Automatically select a Locale for the current user, if requested.

protected  ActionMappingprocessMapping(HttpServletRequest request, HttpServletResponse response, String path)
    

Select the mapping used to process the selection path for this request.

protected  HttpServletRequestprocessMultipart(HttpServletRequest request)
    

If this is a multipart request, wrap it with a special wrapper.

protected  voidprocessNoCache(HttpServletRequest request, HttpServletResponse response)
    

Set the no-cache headers for all responses, if requested.

protected  StringprocessPath(HttpServletRequest request, HttpServletResponse response)
    

Identify and return the path component (from the request URI) that we will use to select an ActionMapping with which to dispatch.

protected  voidprocessPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping)
    

Populate the properties of the specified ActionForm instance from the request parameters included with this request.

protected  booleanprocessPreprocess(HttpServletRequest request, HttpServletResponse response)
    

General-purpose preprocessing hook that can be overridden as required by subclasses.

protected  booleanprocessRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
    

If this action is protected by security roles, make sure that the current user possesses at least one of them.

protected  booleanprocessValidate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping)
    

If this request was not cancelled, and the request's ActionMapping has not disabled validation, call the validate method of the specified ActionForm , and forward to the input path if there were any errors.


Field Detail
INCLUDE_PATH_INFO
final public static String INCLUDE_PATH_INFO(Code)

The request attribute under which the path information is stored for processing during a RequestDispatcher.include call.




INCLUDE_SERVLET_PATH
final public static String INCLUDE_SERVLET_PATH(Code)

The request attribute under which the servlet path information is stored for processing during a RequestDispatcher.include call.




actions
protected HashMap actions(Code)

The set of Action instances that have been created and initialized, keyed by the fully qualified Java class name of the Action class.




log
protected static Log log(Code)

Commons Logging instance.




moduleConfig
protected ModuleConfig moduleConfig(Code)

The ModuleConfiguration with which we are associated.




servlet
protected ActionServlet servlet(Code)

The servlet with which we are associated.






Method Detail
destroy
public void destroy()(Code)

Clean up in preparation for a shutdown of this application.




doForward
protected void doForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)

Do a forward to specified URI using a RequestDispatcher. This method is used by all internal method needing to do a forward.


Parameters:
  uri - Context-relative URI to forward to
Parameters:
  request - Current page request
Parameters:
  response - Current page response
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs
since:
   Struts 1.1



doInclude
protected void doInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)

Do an include of specified URI using a RequestDispatcher. This method is used by all internal method needing to do an include.


Parameters:
  uri - Context-relative URI to include
Parameters:
  request - Current page request
Parameters:
  response - Current page response
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs
since:
   Struts 1.1



getInternal
protected MessageResources getInternal()(Code)

Return the MessageResources instance containing our internal message strings.

The MessageResources instance containing ourinternal message strings.



getServletContext
protected ServletContext getServletContext()(Code)

Return the ServletContext for the web application in which we are running.

The ServletContext for the web application.



init
public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException(Code)

Initialize this request processor instance.


Parameters:
  servlet - The ActionServlet we are associated with
Parameters:
  moduleConfig - The ModuleConfig we are associated with.
throws:
  ServletException - If an error occor during initialization



internalModuleRelativeForward
protected void internalModuleRelativeForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)

Do a module relative forward to specified URI using request dispatcher. URI is relative to the current module. The real URI is compute by prefixing the module name.

This method is used internally and is not part of the public API. It is advised to not use it in subclasses.


Parameters:
  uri - Module-relative URI to forward to
Parameters:
  request - Current page request
Parameters:
  response - Current page response
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs
since:
   Struts 1.1



internalModuleRelativeInclude
protected void internalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)

Do a module relative include to specified URI using request dispatcher. URI is relative to the current module. The real URI is compute by prefixing the module name.

This method is used internally and is not part of the public API. It is advised to not use it in subclasses.


Parameters:
  uri - Module-relative URI to include
Parameters:
  request - Current page request
Parameters:
  response - Current page response
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs
since:
   Struts 1.1



process
public void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)

Process an HttpServletRequest and create the corresponding HttpServletResponse or dispatch to another resource.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a processing exception occurs



processActionCreate
protected Action processActionCreate(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException(Code)

Return an Action instance that will be used to process the current request, creating a new one if necessary.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  mapping - The mapping we are using An Action instance that will be used to processthe current request.
throws:
  IOException - if an input/output error occurs



processActionForm
protected ActionForm processActionForm(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)(Code)

Retrieve and return the ActionForm associated with this mapping, creating and retaining one if necessary. If there is no ActionForm associated with this mapping, return null.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  mapping - The mapping we are using The ActionForm associated with this mapping.



processActionPerform
protected ActionForward processActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code)

Ask the specified Action instance to handle this request. Return the ActionForward instance (if any) returned by the called Action for further processing.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  action - The Action instance to be used
Parameters:
  form - The ActionForm instance to pass to this Action
Parameters:
  mapping - The ActionMapping instance to pass to this Action The ActionForward instance (if any) returned bythe called Action.
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs



processCachedMessages
protected void processCachedMessages(HttpServletRequest request, HttpServletResponse response)(Code)

Removes any ActionMessages object stored in the session under Globals.MESSAGE_KEY and Globals.ERROR_KEY if the messages' isAccessed method returns true. This allows messages to be stored in the session, display one time, and be released here.


Parameters:
  request - The servlet request we are processing.
Parameters:
  response - The servlet response we are creating.
since:
   Struts 1.2



processContent
protected void processContent(HttpServletRequest request, HttpServletResponse response)(Code)

Set the default content type (with optional character encoding) for all responses if requested. NOTE - This header will be overridden automatically if a RequestDispatcher.forward call is ultimately invoked.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating



processException
protected ActionForward processException(HttpServletRequest request, HttpServletResponse response, Exception exception, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code)

Ask our exception handler to handle the exception. Return the ActionForward instance (if any) returned by the called ExceptionHandler.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are processing
Parameters:
  exception - The exception being handled
Parameters:
  form - The ActionForm we are processing
Parameters:
  mapping - The ActionMapping we are using The ActionForward instance (if any) returned bythe called ExceptionHandler.
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs



processForward
protected boolean processForward(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)

Process a forward requested by this mapping (if any). Return true if standard processing should continue, or false if we have already handled this request.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  mapping - The ActionMapping we are using true to continue normal processing;false if a response has been created.
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs



processForwardConfig
protected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) throws IOException, ServletException(Code)

Forward or redirect to the specified destination, by the specified mechanism. This method uses a ForwardConfig object instead an ActionForward.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  forward - The ForwardConfig controlling where we go next
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs



processInclude
protected boolean processInclude(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)

Process an include requested by this mapping (if any). Return true if standard processing should continue, or false if we have already handled this request.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  mapping - The ActionMapping we are using true to continue normal processing;false if a response has been created.
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if thrown by invoked methods



processLocale
protected void processLocale(HttpServletRequest request, HttpServletResponse response)(Code)

Automatically select a Locale for the current user, if requested. NOTE - configuring Locale selection will trigger the creation of a new HttpSession if necessary.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating



processMapping
protected ActionMapping processMapping(HttpServletRequest request, HttpServletResponse response, String path) throws IOException(Code)

Select the mapping used to process the selection path for this request. If no mapping can be identified, create an error response and return null.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  path - The portion of the request URI for selecting a mapping The mapping used to process the selection path for thisrequest.
throws:
  IOException - if an input/output error occurs



processMultipart
protected HttpServletRequest processMultipart(HttpServletRequest request)(Code)

If this is a multipart request, wrap it with a special wrapper. Otherwise, return the request unchanged.


Parameters:
  request - The HttpServletRequest we are processing A wrapped request, if the request is multipart; otherwise theoriginal request.



processNoCache
protected void processNoCache(HttpServletRequest request, HttpServletResponse response)(Code)

Set the no-cache headers for all responses, if requested. NOTE - This header will be overridden automatically if a RequestDispatcher.forward call is ultimately invoked.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating



processPath
protected String processPath(HttpServletRequest request, HttpServletResponse response) throws IOException(Code)

Identify and return the path component (from the request URI) that we will use to select an ActionMapping with which to dispatch. If no such path can be identified, create an error response and return null.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating The path that will be used to select an action mapping.
throws:
  IOException - if an input/output error occurs



processPopulate
protected void processPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws ServletException(Code)

Populate the properties of the specified ActionForm instance from the request parameters included with this request. In addition, request attribute Globals.CANCEL_KEY will be set if the request was submitted with a button created by CancelTag.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  form - The ActionForm instance we are populating
Parameters:
  mapping - The ActionMapping we are using
throws:
  ServletException - if thrown by RequestUtils.populate()



processPreprocess
protected boolean processPreprocess(HttpServletRequest request, HttpServletResponse response)(Code)

General-purpose preprocessing hook that can be overridden as required by subclasses. Return true if you want standard processing to continue, or false if the response has already been completed. The default implementation does nothing.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating true to continue normal processing;false if a response has been created.



processRoles
protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)

If this action is protected by security roles, make sure that the current user possesses at least one of them. Return true to continue normal processing, or false if an appropriate response has been created and processing should terminate.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  mapping - The mapping we are using true to continue normal processing;false if a response has been created.
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs



processValidate
protected boolean processValidate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws IOException, ServletException, InvalidCancelException(Code)

If this request was not cancelled, and the request's ActionMapping has not disabled validation, call the validate method of the specified ActionForm , and forward to the input path if there were any errors. Return true if we should continue processing, or false if we have already forwarded control back to the input form.


Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
Parameters:
  form - The ActionForm instance we are populating
Parameters:
  mapping - The ActionMapping we are using true to continue normal processing;false if a response has been created.
throws:
  IOException - if an input/output error occurs
throws:
  ServletException - if a servlet exception occurs
throws:
  InvalidCancelException - if a cancellation is attemptedwithout the proper action configuration.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.