|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCommonsMultipartRequestHandler
com.ibm.portal.struts.upload.WpCommonsMultipartRequestHandler
public class WpCommonsMultipartRequestHandler
This is a modified version of the Struts CommonsMultipartRequestHandler that will allow the file element's name to be namescoped. The FileItem.getFieldName will now return the un-namescoped name so the processPopulate step can work.
| Field Summary | |
|---|---|
protected java.util.Hashtable |
elementsAll
The combined text and file request parameters. |
protected java.util.Hashtable |
elementsFile
The file request parameters. |
protected java.util.Hashtable |
elementsText
The text request parameters. |
protected static Log |
log
Commons Logging instance. |
| Constructor Summary | |
|---|---|
WpCommonsMultipartRequestHandler()
WpCommonsMultipartRequestHandler constructor. |
|
| Method Summary | |
|---|---|
protected void |
addFileParameter(HttpServletRequest request,
FileItem item)
Adds a file parameter to the set of file parameters for this request and also to the list of all parameters. |
protected void |
addTextParameter(HttpServletRequest request,
FileItem item)
Adds a regular text parameter to the set of text parameters for this request and also to the list of all parameters. |
void |
finish()
Cleans up at the end of a request. |
java.util.Hashtable |
getAllElements()
Returns a hash table containing both text and file request parameters. |
protected java.lang.String |
getFieldName(HttpServletRequest request,
FileItem item)
Gets the field name. |
java.util.Hashtable |
getFileElements()
Returns a hash table containing the file (that is, non-text) request parameters. |
protected long |
getSizeFieldThreshold(ModuleConfig mc)
Returns the size field threshold which determines whether an uploaded file will be written to disk or cached in memory. |
java.util.Hashtable |
getTextElements()
Returns a hash table containing the text (that is, non-file) request parameters. |
void |
handleRequest(HttpServletRequest request)
Parses the input stream and partitions the parsed items into a set of form fields and a set of file items. |
void |
rollback()
Cleans up when a problem occurs during request processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Log log
protected java.util.Hashtable elementsAll
protected java.util.Hashtable elementsFile
protected java.util.Hashtable elementsText
| Constructor Detail |
|---|
public WpCommonsMultipartRequestHandler()
| Method Detail |
|---|
public void handleRequest(HttpServletRequest request)
throws ServletException
FileItem instances
to Struts FormFile instances.
request - The multipart request to be processed.
ServletException - if an unrecoverable error occurs.public java.util.Hashtable getTextElements()
public java.util.Hashtable getFileElements()
public java.util.Hashtable getAllElements()
public void rollback()
public void finish()
protected void addTextParameter(HttpServletRequest request,
FileItem item)
request - The request in which the parameter was specified.item - The file item for the parameter to add.
protected void addFileParameter(HttpServletRequest request,
FileItem item)
item - The file item for the parameter to add.
protected java.lang.String getFieldName(HttpServletRequest request,
FileItem item)
request - the request objectitem - the file item
protected long getSizeFieldThreshold(ModuleConfig mc)
mc - The current module's configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||