Java Doc for MultipartRequest.java in  » Swing-Library » wings3 » org » wings » session » 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 » Swing Library » wings3 » org.wings.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.http.HttpServletRequestWrapper
   org.wings.session.MultipartRequest

MultipartRequest
final public class MultipartRequest extends HttpServletRequestWrapper (Code)
A utility class to handle multipart/form-data requests, the kind of requests that support file uploads. This class can receive arbitrarily large files (up to an artificial limit you can set), and fairly efficiently too. And it knows and works around several browser bugs that don't know how to upload files correctly.

A client can upload files using an HTML form with the following structure. Note that not all browsers support file uploads.

 <FORM ACTION="/servlet/Handler" METHOD=POST
 ENCTYPE="multipart/form-data">
 What is your name? <INPUT TYPE=TEXT NAME=submitter> <BR>
 Which file to upload? <INPUT TYPE=FILE NAME=file> <BR>
 <INPUT TYPE=SUBMIT>
 </FORM>
 

The full file upload specification is contained in experimental RFC 1867, available at http://ds.internic.net/rfc/rfc1867.txt.
author:
   Holger Engels


Inner Class :class UploadedFile


Constructor Summary
public  MultipartRequest(HttpServletRequest request)
    
public  MultipartRequest(HttpServletRequest request, int maxPostSize)
    

Method Summary
public  StringgetContentType(String name)
     Returns the content type of the specified file (as supplied by the client browser), or null if the file was not included in the upload.
public  FilegetFile(String name)
     Returns a File object for the specified file saved on the server's filesystem, or null if the file was not included in the upload.
public  StringgetFileId(String name)
     Returns the fileid of the specified file, or null if the file was not included in the upload.
public  StringgetFileName(String name)
     Returns the filename of the specified file, or null if the file was not included in the upload.
public  IteratorgetFileNames()
     Returns the names of all the uploaded files as an Enumeration of Strings.
public  MapgetParameterMap()
    
public  EnumerationgetParameterNames()
     Returns the names of all the parameters as an Enumeration of Strings.
public  String[]getParameterValues(String name)
    
final public  booleanisMultipart()
     Indicates if this class was successfully able to parse request as multipart request.
protected  voidprocessRequest(HttpServletRequest req)
     Parses passed request and stores contained parameters.
protected  voidputParameter(String name, String value)
     Stores a parameter identified in this request.
protected  voidsetException(String param, Exception ex)
     Store exception as request parameter.


Constructor Detail
MultipartRequest
public MultipartRequest(HttpServletRequest request) throws IOException(Code)

Parameters:
  request - the servlet request
throws:
  IOException - if the uploaded content is larger than 1 Megabyteor there's a problem reading or parsing the request



MultipartRequest
public MultipartRequest(HttpServletRequest request, int maxPostSize) throws IOException(Code)

Parameters:
  request - the servlet request
Parameters:
  maxPostSize - the maximum size of the POST content
throws:
  IOException - if the uploaded content is larger thanmaxPostSize or there's a problem reading or parsing the request




Method Detail
getContentType
public String getContentType(String name)(Code)
Returns the content type of the specified file (as supplied by the client browser), or null if the file was not included in the upload.
Parameters:
  name - the file name the content type of the file



getFile
public File getFile(String name)(Code)
Returns a File object for the specified file saved on the server's filesystem, or null if the file was not included in the upload.
Parameters:
  name - the file name a File object for the named file



getFileId
public String getFileId(String name)(Code)
Returns the fileid of the specified file, or null if the file was not included in the upload. The fileid is the name under which the file is saved in the filesystem.
Parameters:
  name - the file name the filesystem name of the file



getFileName
public String getFileName(String name)(Code)
Returns the filename of the specified file, or null if the file was not included in the upload. The filename is the name specified by the user. It is not the name under which the file is actually saved.
Parameters:
  name - the file name the filesystem name of the file



getFileNames
public Iterator getFileNames()(Code)
Returns the names of all the uploaded files as an Enumeration of Strings. It returns an empty Enumeration if there are no uploaded files. Each file name is the name specified by the form, not by the user. the names of all the uploaded files as an Enumeration of Strings



getParameterMap
public Map getParameterMap()(Code)



getParameterNames
public Enumeration getParameterNames()(Code)
Returns the names of all the parameters as an Enumeration of Strings. It returns an empty Enumeration if there are no parameters. the names of all the parameters as an Enumeration of Strings



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



isMultipart
final public boolean isMultipart()(Code)
Indicates if this class was successfully able to parse request as multipart request.



processRequest
protected void processRequest(HttpServletRequest req) throws IOException(Code)
Parses passed request and stores contained parameters.
throws:
  IOException - On unrecoverable parsing bugs due to old Tomcat version.



putParameter
protected void putParameter(String name, String value)(Code)
Stores a parameter identified in this request.



setException
protected void setException(String param, Exception ex)(Code)
Store exception as request parameter.



Methods inherited from javax.servlet.http.HttpServletRequestWrapper
public String getAuthType()(Code)(Java Doc)
public String getContextPath()(Code)(Java Doc)
public Cookie[] getCookies()(Code)(Java Doc)
public long getDateHeader(String name)(Code)(Java Doc)
public String getHeader(String name)(Code)(Java Doc)
public Enumeration getHeaderNames()(Code)(Java Doc)
public Enumeration getHeaders(String name)(Code)(Java Doc)
public int getIntHeader(String name)(Code)(Java Doc)
public String getMethod()(Code)(Java Doc)
public String getPathInfo()(Code)(Java Doc)
public String getPathTranslated()(Code)(Java Doc)
public String getQueryString()(Code)(Java Doc)
public String getRemoteUser()(Code)(Java Doc)
public String getRequestURI()(Code)(Java Doc)
public StringBuffer getRequestURL()(Code)(Java Doc)
public String getRequestedSessionId()(Code)(Java Doc)
public String getServletPath()(Code)(Java Doc)
public HttpSession getSession(boolean create)(Code)(Java Doc)
public HttpSession getSession()(Code)(Java Doc)
public java.security.Principal getUserPrincipal()(Code)(Java Doc)
public boolean isRequestedSessionIdFromCookie()(Code)(Java Doc)
public boolean isRequestedSessionIdFromURL()(Code)(Java Doc)
public boolean isRequestedSessionIdFromUrl()(Code)(Java Doc)
public boolean isRequestedSessionIdValid()(Code)(Java Doc)
public boolean isUserInRole(String role)(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.