Java Doc for DispatcherUtils.java in  » J2EE » webwork-2.2.6 » com » opensymphony » webwork » dispatcher » 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 » J2EE » webwork 2.2.6 » com.opensymphony.webwork.dispatcher 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.opensymphony.webwork.dispatcher.DispatcherUtils

DispatcherUtils
public class DispatcherUtils (Code)
A utility class whereby FilterDispatcher delegate most of its tasks to. A static singleton that gets initlialized upon the call to it's initalize(ServletContext) method
author:
   patrick
author:
   Rainer Hermanns
author:
   tm_jee
version:
   $Date: 2007-06-11 16:53:47 +0200 (Mon, 11 Jun 2007) $ $Id: DispatcherUtils.java 2920 2007-06-11 14:53:47Z tm_jee $
See Also:   com.opensymphony.webwork.dispatcher.FilterDispatcher

Inner Class :public class Locator

Field Summary
protected  booleandevMode
    
protected  booleanparamsWorkaroundEnabled
    

Constructor Summary
protected  DispatcherUtils(ServletContext servletContext)
    

Method Summary
public  voidcleanup()
    
public  MapcreateContextMap(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping, ServletContext context)
    
public  HashMapcreateContextMap(Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
     Merges all application and servlet attributes into a single HashMap to represent the entire Action context.
Parameters:
  requestMap - a Map of all request attributes.
Parameters:
  parameterMap - a Map of all request parameters.
Parameters:
  sessionMap - a Map of all session attributes.
Parameters:
  applicationMap - a Map of all servlet context attributes.
Parameters:
  request - the HttpServletRequest object.
Parameters:
  response - the HttpServletResponse object.
Parameters:
  servletContext - the ServletContext object.
public static  DispatcherUtilsgetInstance()
    
public static  intgetMaxSize()
     Returns the maximum upload size allowed for multipart requests (this is configurable).
public  StringgetSaveDir(ServletContext servletContext)
     Returns the path to save uploaded files to (this is configurable).
protected  voidinit(ServletContext servletContext)
    
public static  voidinitialize(ServletContext servletContext)
    
public static  booleanisPortletSupportActive()
     Returns true, if portlet support is active, false otherwise.
public  voidprepare(HttpServletRequest request, HttpServletResponse response)
    
public  voidsendError(HttpServletRequest request, HttpServletResponse response, ServletContext ctx, int code, Exception e)
     Sends an HTTP error response code.
public  voidserviceAction(HttpServletRequest request, HttpServletResponse response, ServletContext context, ActionMapping mapping)
     Loads the action and executes it.
public static  voidsetInstance(DispatcherUtils instance)
    
public static  voidsetPortletSupportActive(boolean portletSupportActive)
     Set the flag that portlet support is active or not.
public  HttpServletRequestwrapRequest(HttpServletRequest request, ServletContext servletContext)
     Wraps and returns the given response or returns the original response object.

Field Detail
devMode
protected boolean devMode(Code)



paramsWorkaroundEnabled
protected boolean paramsWorkaroundEnabled(Code)




Constructor Detail
DispatcherUtils
protected DispatcherUtils(ServletContext servletContext)(Code)




Method Detail
cleanup
public void cleanup()(Code)



createContextMap
public Map createContextMap(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping, ServletContext context)(Code)



createContextMap
public HashMap createContextMap(Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code)
Merges all application and servlet attributes into a single HashMap to represent the entire Action context.
Parameters:
  requestMap - a Map of all request attributes.
Parameters:
  parameterMap - a Map of all request parameters.
Parameters:
  sessionMap - a Map of all session attributes.
Parameters:
  applicationMap - a Map of all servlet context attributes.
Parameters:
  request - the HttpServletRequest object.
Parameters:
  response - the HttpServletResponse object.
Parameters:
  servletContext - the ServletContext object. a HashMap representing the Action context.



getInstance
public static DispatcherUtils getInstance()(Code)



getMaxSize
public static int getMaxSize()(Code)
Returns the maximum upload size allowed for multipart requests (this is configurable). the maximum upload size allowed for multipart requests



getSaveDir
public String getSaveDir(ServletContext servletContext)(Code)
Returns the path to save uploaded files to (this is configurable). the path to save uploaded files to



init
protected void init(ServletContext servletContext)(Code)



initialize
public static void initialize(ServletContext servletContext)(Code)



isPortletSupportActive
public static boolean isPortletSupportActive()(Code)
Returns true, if portlet support is active, false otherwise. true, if portlet support is active, false otherwise.



prepare
public void prepare(HttpServletRequest request, HttpServletResponse response)(Code)



sendError
public void sendError(HttpServletRequest request, HttpServletResponse response, ServletContext ctx, int code, Exception e)(Code)
Sends an HTTP error response code.
Parameters:
  request - the HttpServletRequest object.
Parameters:
  response - the HttpServletResponse object.
Parameters:
  code - the HttpServletResponse error code (see javax.servlet.http.HttpServletResponse for possible error codes).
Parameters:
  e - the Exception that is reported.



serviceAction
public void serviceAction(HttpServletRequest request, HttpServletResponse response, ServletContext context, ActionMapping mapping) throws ServletException(Code)
Loads the action and executes it. This method first creates the action context from the given parameters then loads an ActionProxy from the given action name and namespace. After that, the action is executed and output channels throught the response object. Actions not found are sent back to the user via the DispatcherUtils.sendError method, using the 404 return code. All other errors are reported by throwing a ServletException.
Parameters:
  request - the HttpServletRequest object
Parameters:
  response - the HttpServletResponse object
Parameters:
  mapping - the action mapping object
throws:
  ServletException - when an unknown error occurs (not a 404, but typically something thatwould end up as a 5xx by the servlet container)



setInstance
public static void setInstance(DispatcherUtils instance)(Code)



setPortletSupportActive
public static void setPortletSupportActive(boolean portletSupportActive)(Code)
Set the flag that portlet support is active or not.
Parameters:
  portletSupportActive - true or false



wrapRequest
public HttpServletRequest wrapRequest(HttpServletRequest request, ServletContext servletContext) throws IOException(Code)
Wraps and returns the given response or returns the original response object. This is used to transparently handle multipart data as a wrapped class around the given request. Override this method to handle multipart requests in a special way or to handle other types of requests. Note, com.opensymphony.webwork.dispatcher.multipart.MultiPartRequestWrapper is flexible - you should look to that first before overriding this method to handle multipart data.
Parameters:
  request - the HttpServletRequest object. a wrapped request or original request.
See Also:   com.opensymphony.webwork.dispatcher.multipart.MultiPartRequestWrapper



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.