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


com.opensymphony.webwork.dispatcher.WebWorkRequestWrapper
   com.opensymphony.webwork.dispatcher.multipart.MultiPartRequestWrapper

MultiPartRequestWrapper
public class MultiPartRequestWrapper extends WebWorkRequestWrapper (Code)
Parses a multipart request and provides a wrapper around the request. The parsing implementation used depends on the webwork.multipart.parser setting. It should be set to a class which extends com.opensymphony.webwork.dispatcher.multipart.MultiPartRequest .

Webwork ships with three implementations, com.opensymphony.webwork.dispatcher.multipart.PellMultiPartRequest , and com.opensymphony.webwork.dispatcher.multipart.CosMultiPartRequest and com.opensymphony.webwork.dispatcher.multipart.JakartaMultiPartRequest . The Jakarta implementation is the default. The webwork.multipart.parser property should be set to jakarta for the Jakarta implementation, pell for the Pell implementation and cos for the Jason Hunter implementation.

The files are uploaded when the object is instantiated. If there are any errors they are logged using MultiPartRequestWrapper.addError(String) . An action handling a multipart form should first check MultiPartRequestWrapper.hasErrors() before doing any other processing.


author:
   Matt Baldree



Field Summary
 Collectionerrors
    
final protected static  Loglog
    
 MultiPartRequestmulti
    

Constructor Summary
public  MultiPartRequestWrapper(HttpServletRequest request, String saveDir, int maxSize)
     Instantiates the appropriate MultiPartRequest parser implementation and processes the data.

Method Summary
protected  voidaddError(String anErrorMessage)
     Adds an error message.
public  StringgetContentType(String fieldName)
    
public  String[]getContentTypes(String name)
     Get an array of content encoding for the specified input field name or null if no content type was specified.
public  CollectiongetErrors()
     Returns a collection of any errors generated when parsing the multipart request.
public  FilegetFile(String fieldName)
    
public  EnumerationgetFileNames()
    
public  String[]getFileNames(String fieldName)
    
public  EnumerationgetFileParameterNames()
    
public  String[]getFileSystemNames(String fieldName)
     Get the filename(s) of the file(s) uploaded for the given input field name.
public  File[]getFiles(String fieldName)
     Get a java.io.File[] for the given input field name.
public  StringgetFilesystemName(String fieldName)
    
public  StringgetParameter(String name)
    
public  MapgetParameterMap()
    
public  EnumerationgetParameterNames()
    
public  String[]getParameterValues(String name)
    
public  booleanhasErrors()
     Returns true if any errors occured when parsing the HTTP multipart request, false otherwise.
protected  EnumerationmergeParams(Enumeration params1, Enumeration params2)
     Merges 2 enumeration of parameters as one.
Parameters:
  params1 - the first enumeration.
Parameters:
  params2 - the second enumeration.

Field Detail
errors
Collection errors(Code)



log
final protected static Log log(Code)



multi
MultiPartRequest multi(Code)




Constructor Detail
MultiPartRequestWrapper
public MultiPartRequestWrapper(HttpServletRequest request, String saveDir, int maxSize)(Code)
Instantiates the appropriate MultiPartRequest parser implementation and processes the data.
Parameters:
  request - the servlet request object
Parameters:
  saveDir - directory to save the file(s) to
Parameters:
  maxSize - maximum file size allowed




Method Detail
addError
protected void addError(String anErrorMessage)(Code)
Adds an error message.
Parameters:
  anErrorMessage - the error message to report.



getContentType
public String getContentType(String fieldName)(Code)
MultiPartRequestWrapper.getContentTypes(String)



getContentTypes
public String[] getContentTypes(String name)(Code)
Get an array of content encoding for the specified input field name or null if no content type was specified.
Parameters:
  name - input field name an array of content encoding for the specified input field name



getErrors
public Collection getErrors()(Code)
Returns a collection of any errors generated when parsing the multipart request. the error Collection.



getFile
public File getFile(String fieldName)(Code)
MultiPartRequestWrapper.getFiles(String)



getFileNames
public Enumeration getFileNames()(Code)
MultiPartRequestWrapper.getFileParameterNames()



getFileNames
public String[] getFileNames(String fieldName)(Code)
Get a String array of the file names for uploaded files a String[] of file names for uploaded files



getFileParameterNames
public Enumeration getFileParameterNames()(Code)
Get an enumeration of the parameter names for uploaded files enumeration of parameter names for uploaded files



getFileSystemNames
public String[] getFileSystemNames(String fieldName)(Code)
Get the filename(s) of the file(s) uploaded for the given input field name. Returns null if the file is not found.
Parameters:
  fieldName - input field name the filename(s) of the file(s) uploaded for the given input field name ornull if name not found.



getFiles
public File[] getFiles(String fieldName)(Code)
Get a java.io.File[] for the given input field name.
Parameters:
  fieldName - input field name a File[] object for files associated with the specified input field name



getFilesystemName
public String getFilesystemName(String fieldName)(Code)
MultiPartRequestWrapper.getFileSystemNames(String)



getParameter
public String getParameter(String name)(Code)

See Also:   javax.servlet.http.HttpServletRequest.getParameter(String)



getParameterMap
public Map getParameterMap()(Code)

See Also:   javax.servlet.http.HttpServletRequest.getParameterMap



getParameterNames
public Enumeration getParameterNames()(Code)

See Also:   javax.servlet.http.HttpServletRequest.getParameterNames



getParameterValues
public String[] getParameterValues(String name)(Code)

See Also:   javax.servlet.http.HttpServletRequest.getParameterValues(String)



hasErrors
public boolean hasErrors()(Code)
Returns true if any errors occured when parsing the HTTP multipart request, false otherwise. true if any errors occured when parsing the HTTP multipart request, false otherwise.



mergeParams
protected Enumeration mergeParams(Enumeration params1, Enumeration params2)(Code)
Merges 2 enumeration of parameters as one.
Parameters:
  params1 - the first enumeration.
Parameters:
  params2 - the second enumeration. a single Enumeration of all elements from both Enumerations.



Methods inherited from com.opensymphony.webwork.dispatcher.WebWorkRequestWrapper
public Object getAttribute(String s)(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.