public class UploadServlet.ThisPage extends ThisPage
Since a single object can be used for multiple simultaneous HTTP requests, information about a single request can't be placed in the fields relating to the instance.
By placing the contents of all of the data fields in this object, the methods can have access to all of the fields without interfering with each other.
Each of the input fields is identified by its name in the HTML tag.
Modifier and Type | Field and Description |
---|---|
protected String |
boundary
Boundary marker for multipart form
|
protected boolean |
endOfPacket
True if final part of request has been
processed.
|
protected Hashtable<String,UploadServlet.Contents> |
items
Contains the various elements from the requesting form.
|
protected String |
redirectAddress
Address to be used for redirecting servlet upon completion.
|
Constructor and Description |
---|
UploadServlet.ThisPage(HttpServletRequest value1,
HttpServletResponse value2,
ServletConfig value3)
Constructor for object, setting the input and output streams so that the
element can be processed.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(UploadServlet.Contents value)
Adds an element to the list associated with the HTTP request.
|
String |
getBoundary()
Obtains value of boundary marker
|
byte[] |
getByteArray(String key)
Return the contents of one of the elements as a byte
array.
|
UploadServlet.Contents |
getElement(String key)
Retrieve the object associated with an element based on the
element name.
|
boolean |
getEndOfPacket()
Gets value of endOfPacket.
|
Enumeration<String> |
getPartNames()
Return an enumeration containing the names of the elements.
|
String |
getRedirectAddress()
Get the URL to be used for redirecting the servlet upon completion.
|
String |
getString(String key)
Return the contents of one of the elements as
a String object.
|
void |
setEndOfPacket(boolean value)
Sets value of endOfPacket.
|
void |
setRedirectAddress(String value)
Set the URL for redirecting the servlet upon completion.
|
addException, addMessage, clearWriter, errorMessage, getConfig, getContents, getContext, getDatabase, getDebugLevel, getEndDate, getFileName, getInputStream, getMessageList, getMimeType, getMode, getOutputStream, getPrinter, getRequest, getResponse, getStartDate, getTerminateRequest, getWriter, sendContents, setContents, setDatabase, setDebugLevel, setEndDate, setFileName, setMimeType, setMode, setStartDate
protected Hashtable<String,UploadServlet.Contents> items
protected boolean endOfPacket
getEndOfPacket()
,
setEndOfPacket(boolean)
protected String redirectAddress
public UploadServlet.ThisPage(HttpServletRequest value1, HttpServletResponse value2, ServletConfig value3) throws IOException
value1
- Request objectvalue2
- Response objectvalue3
- Servlet configuration objectIOException
public void setEndOfPacket(boolean value)
value
- Value for endOfPacketendOfPacket
public boolean getEndOfPacket()
endOfPacket
public String getBoundary()
public void addElement(UploadServlet.Contents value)
value
- Elementpublic Enumeration<String> getPartNames()
public void setRedirectAddress(String value)
setRedirectAddress
in class ThisPage
value
- URL to be used for redirecting servletredirectAddress
public String getRedirectAddress()
getRedirectAddress
in class ThisPage
redirectAddress
public UploadServlet.Contents getElement(String key)
key
- Name of the element in the formpublic String getString(String key)
key
- Key value for elementpublic byte[] getByteArray(String key)
key
- Key value for the element