pt.moredata.dataentry.util.http
Class DataEntryServletRequest

java.lang.Object
  extended bypt.moredata.dataentry.util.http.DataEntryServletRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class DataEntryServletRequest
extends java.lang.Object
implements javax.servlet.http.HttpServletRequest

Esta classe permite manipular pedidos que venham com diferentes tipos de encode. Company MoreData

Version:
$Revision: 1.4 $
Author:
pcarmo

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
DataEntryServletRequest(javax.servlet.http.HttpServletRequest request)
          Construtor para fazer o file upload directamente para a memoria.
DataEntryServletRequest(javax.servlet.http.HttpServletRequest request, java.lang.String saveDirectory)
          Construtor para fazer o file upload directamente para a memoria e para gurdar uma copia dos ficheiro numa dada directoria.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the named attribute as an Object.
 java.util.Enumeration getAttributeNames()
          Returns an Enumeration containing the names of the attributes available to this request.
 java.lang.String getAuthType()
          Returns the name of the authentication scheme the server uses, for example, "BASIC" or "SSL," or null if the server does not have an authentication scheme.
 java.lang.String getCharacterEncoding()
          Returns the name of the character encoding style used in this request.
 int getContentLength()
          Returns the length, in bytes, of the content contained in the request and sent by way of the input stream or -1 if the length is not known.
 java.lang.String getContentType()
          Returns the MIME type of the content of the request, or null if the type is not known.
 java.lang.String getContentType(java.lang.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.
 java.lang.String getContextPath()
           
 javax.servlet.http.Cookie[] getCookies()
          Returns an array containing all of the Cookie objects the browser sent with this request.
 long getDateHeader(java.lang.String name)
          Returns the value of the specified request header as a long value that represents a Date object.
 int getEncodeType()
           
 java.io.File getFile(java.lang.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.
 byte[] getFileData(java.lang.String fileName)
          Returns a byte array object for the specified file saved on the server's filesystem, or null if the file was not included in the upload.
 java.util.Enumeration getFileNames()
          Returns the names of all the uploaded files as an Enumeration of Strings.
 java.lang.String getFilesystemName(java.lang.String name)
          Returns the filesystem name of the specified file, or null if the file was not included in the upload.
 java.lang.String getHeader(java.lang.String name)
          Returns the value of the specified request header as a String.
 java.util.Enumeration getHeaderNames()
          Returns an enumeration of all the header names this request contains.
 java.util.Enumeration getHeaders(java.lang.String name)
           
 javax.servlet.ServletInputStream getInputStream()
          Retrieves binary data from the body of the request as a ServletInputStream, which gives you the ability to read one line at a time.
 int getIntHeader(java.lang.String name)
          Returns the value of the specified request header as an integer.
 java.lang.String getLocalAddr()
           
 java.util.Locale getLocale()
           
 java.util.Enumeration getLocales()
           
 java.lang.String getLocalName()
           
 int getLocalPort()
           
 java.lang.String getMethod()
          Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
 java.lang.String getParameter(java.lang.String name)
          Returns the value of a request parameter as a String, or null if the parameter does not exist.
 java.util.Map getParameterMap()
           
 java.util.Enumeration getParameterNames()
          Returns an Enumeration of String objects containing the names of the parameters contained in this request.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
 java.lang.String getPathInfo()
          Returns any extra path information associated with the URL the client sent when it made this request.
 java.lang.String getPathTranslated()
          Returns any extra path information after the servlet name but before the query string, and translates it to a real path.
 java.lang.String getProtocol()
          Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
 java.lang.String getQueryString()
          Returns the query string that is contained in the request URL after the path.
 java.io.BufferedReader getReader()
          Returns the body of the request as a BufferedReader that translates character set encodings.
 java.lang.String getRealPath(java.lang.String path)
          Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext#getRealPath instead.
 java.lang.String getRemoteAddr()
          Returns the Internet Protocol (IP) address of the client that sent the request.
 java.lang.String getRemoteHost()
          Returns the fully qualified name of the client that sent the request.
 int getRemotePort()
           
 java.lang.String getRemoteUser()
          Returns the name of the user making this request, if the user has logged in using HTTP authentication.
 javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
           
 java.lang.String getRequestedSessionId()
          Returns the session ID specified by the client.
 java.lang.String getRequestURI()
          Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.
 java.lang.StringBuffer getRequestURL()
           
 java.lang.String getScheme()
          Returns the name of the scheme used to make this request, for example, http, https, or ftp.
 java.lang.String getServerName()
          Returns the host name of the server that received the request.
 int getServerPort()
          Returns the port number on which this request was received.
 java.lang.String getServletPath()
          Returns the part of this request's URL that calls the servlet.
 javax.servlet.http.HttpSession getSession()
          Returns the current session associated with this request, or if the request does not have a session, creates one.
 javax.servlet.http.HttpSession getSession(boolean create)
          Returns the current HttpSession associated with this request or, if necessary, creates a new session for the request.
 java.security.Principal getUserPrincipal()
           
 boolean isRequestedSessionIdFromCookie()
          Checks whether the session ID this request submitted came in as a cookie, rather than from the getSession(boolean) method.
 boolean isRequestedSessionIdFromUrl()
          Deprecated. As of Version 2.1 of the Java Servlet API, use isRequestedSessionIdFromURL() instead.
 boolean isRequestedSessionIdFromURL()
          Checks whether the session ID this request submitted came in as part of the request URL, rather than from the getSession(boolean) method.
 boolean isRequestedSessionIdValid()
          Checks whether this request has a valid session in the current session context (which is a HttpSessionContext).
 boolean isSecure()
           
 boolean isUserInRole(java.lang.String role)
           
 void removeAttribute(java.lang.String name)
           
 void setAttribute(java.lang.String key, java.lang.Object o)
          Stores an attribute in the context of this request.
 void setCharacterEncoding(java.lang.String aa)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataEntryServletRequest

public DataEntryServletRequest(javax.servlet.http.HttpServletRequest request,
                               java.lang.String saveDirectory)
                        throws java.lang.RuntimeException
Construtor para fazer o file upload directamente para a memoria e para gurdar uma copia dos ficheiro numa dada directoria.

Parameters:
request - Pedido HttpServletRequest.
saveDirectory - Nome da directoria onde deveram ser guardados os ficheiros.

DataEntryServletRequest

public DataEntryServletRequest(javax.servlet.http.HttpServletRequest request)
                        throws java.lang.RuntimeException
Construtor para fazer o file upload directamente para a memoria.

Parameters:
request - Pedido HttpServletRequest.
Method Detail

getFileData

public byte[] getFileData(java.lang.String fileName)
Returns a byte array object for the specified file saved on the server's filesystem, or null if the file was not included in the upload.

Returns:
a File object for the named file.

getEncodeType

public int getEncodeType()

toString

public java.lang.String toString()

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Returns the value of the named attribute as an Object. This method allows the servlet engine to give the servlet custom information about a request. This method returns null if no attribute of the given name exists.

Attribute names should follow the same conventions as package names. This specification reserves names matching java.*, javax.*, and sun.*.

Specified by:
getAttribute in interface javax.servlet.ServletRequest
Parameters:
name - a String specifying the name of the attribute
Returns:
an Object containing the value of the attribute, or null if the attribute does not exist

getAttributeNames

public java.util.Enumeration getAttributeNames()
Returns an Enumeration containing the names of the attributes available to this request. This method returns an empty Enumeration if the request has no attributes available to it.

Specified by:
getAttributeNames in interface javax.servlet.ServletRequest
Returns:
an Enumeration of strings containing the names of the request's attributes

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Returns the name of the character encoding style used in this request. This method returns null if the request does not use character encoding.

Specified by:
getCharacterEncoding in interface javax.servlet.ServletRequest
Returns:
a String containing the name of the chararacter encoding style, or null if the request does not use character encoding

getContentLength

public int getContentLength()
Returns the length, in bytes, of the content contained in the request and sent by way of the input stream or -1 if the length is not known. Same as the value of the CGI variable CONTENT_LENGTH.

Specified by:
getContentLength in interface javax.servlet.ServletRequest
Returns:
an integer containing the length of the content in the request or -1 if the length is not known

getContentType

public java.lang.String getContentType()
Returns the MIME type of the content of the request, or null if the type is not known. Same as the value of the CGI variable CONTENT_TYPE.

Specified by:
getContentType in interface javax.servlet.ServletRequest
Returns:
a String containing the name of the MIME type of the request, or -1 if the type is not known

getInputStream

public javax.servlet.ServletInputStream getInputStream()
                                                throws java.io.IOException
Retrieves binary data from the body of the request as a ServletInputStream, which gives you the ability to read one line at a time.

Specified by:
getInputStream in interface javax.servlet.ServletRequest
Returns:
a ServletInputStream object containing the body of the request
Throws:
java.lang.IllegalStateException - if the getReader() method has already been called for this request
java.io.IOException - if an input or output exception occurred

getLocale

public java.util.Locale getLocale()
Specified by:
getLocale in interface javax.servlet.ServletRequest

getLocales

public java.util.Enumeration getLocales()
Specified by:
getLocales in interface javax.servlet.ServletRequest

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the value of a request parameter as a String, or null if the parameter does not exist. Request parameters are extra information sent with the request.

You should only use this method when you are sure the parameter has only one value. If the parameter might have more than one value, use getParameterValues(java.lang.String).

If you use this method with a multivalued parameter, the servlet engine determines the return value.

Specified by:
getParameter in interface javax.servlet.ServletRequest
Parameters:
name - a String specifying the name of the parameter
Returns:
a String representing the single value of the parameter
See Also:
getParameterValues(java.lang.String)

getParameterNames

public java.util.Enumeration getParameterNames()
Returns an Enumeration of String objects containing the names of the parameters contained in this request. If the request has no parameters or if the input stream is empty, returns an empty Enumeration. The input stream is empty when all the data returned by getInputStream() has been read.

Specified by:
getParameterNames in interface javax.servlet.ServletRequest
Returns:
an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist. For example, in an HTTP servlet, this method returns an array of String objects containing the values of a query string or posted form.

If the parameter has a single value, the array has a length of 1.

Specified by:
getParameterValues in interface javax.servlet.ServletRequest
Parameters:
name - a String containing the name of the parameter whose value is requested
Returns:
an array of String objects containing the parameter's values
See Also:
getParameter(java.lang.String)

getProtocol

public java.lang.String getProtocol()
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. The value returned is the same as the value of the CGI variable SERVER_PROTOCOL.

Specified by:
getProtocol in interface javax.servlet.ServletRequest
Returns:
a String containing the protocol name and version number

getScheme

public java.lang.String getScheme()
Returns the name of the scheme used to make this request, for example, http, https, or ftp. Different schemes have different rules for constructing URLs, as noted in RFC 1738.

You can reconstruct the URL used to make this request by using this scheme, the server name and port, the pathname to the Web page on the server (also known as the Universal Resource Identifier), and the query string..

Specified by:
getScheme in interface javax.servlet.ServletRequest
Returns:
a String containing the name of the scheme used to make this request

getServerName

public java.lang.String getServerName()
Returns the host name of the server that received the request. Same as the value of the CGI variable SERVER_NAME.

Specified by:
getServerName in interface javax.servlet.ServletRequest
Returns:
a String containing the name of the server to which the request was sent

getServerPort

public int getServerPort()
Returns the port number on which this request was received. Same as the value of the CGI variable SERVER_PORT.

Specified by:
getServerPort in interface javax.servlet.ServletRequest
Returns:
an integer specifying the port number

getReader

public java.io.BufferedReader getReader()
                                 throws java.io.IOException
Returns the body of the request as a BufferedReader that translates character set encodings.

Specified by:
getReader in interface javax.servlet.ServletRequest
Returns:
a BufferedReader containing the body of the request
Throws:
java.io.UnsupportedEncodingException - if the character set encoding used is not supported and the text cannot be decoded
java.lang.IllegalStateException - if getInputStream() method has been called on this request
java.io.IOException - if an input or output exception occurred
See Also:
getInputStream()

getRemoteAddr

public java.lang.String getRemoteAddr()
Returns the Internet Protocol (IP) address of the client that sent the request. Same as the value of the CGI variable REMOTE_ADDR.

Specified by:
getRemoteAddr in interface javax.servlet.ServletRequest
Returns:
a String containing the IP address of the client that sent the request

getRemoteHost

public java.lang.String getRemoteHost()
Returns the fully qualified name of the client that sent the request. Same as the value of the CGI variable REMOTE_HOST.

Specified by:
getRemoteHost in interface javax.servlet.ServletRequest
Returns:
a String containing the fully qualified name of the client

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object o)
Stores an attribute in the context of this request. Attributes are reset between requests.

Attribute names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.

Specified by:
setAttribute in interface javax.servlet.ServletRequest
Parameters:
key - a String specifying the name of the attribute
o - an Object containing the context of the request
Throws:
java.lang.IllegalStateException - if the specified attribute already has a value

getRealPath

public java.lang.String getRealPath(java.lang.String path)
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext#getRealPath instead.

Specified by:
getRealPath in interface javax.servlet.ServletRequest

getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
Specified by:
getRequestDispatcher in interface javax.servlet.ServletRequest

isSecure

public boolean isSecure()
Specified by:
isSecure in interface javax.servlet.ServletRequest

removeAttribute

public void removeAttribute(java.lang.String name)
Specified by:
removeAttribute in interface javax.servlet.ServletRequest

setCharacterEncoding

public void setCharacterEncoding(java.lang.String aa)
                          throws java.io.UnsupportedEncodingException
Specified by:
setCharacterEncoding in interface javax.servlet.ServletRequest
Throws:
java.io.UnsupportedEncodingException

getParameterMap

public java.util.Map getParameterMap()
Specified by:
getParameterMap in interface javax.servlet.ServletRequest

getRemotePort

public int getRemotePort()
Specified by:
getRemotePort in interface javax.servlet.ServletRequest

getLocalPort

public int getLocalPort()
Specified by:
getLocalPort in interface javax.servlet.ServletRequest

getLocalName

public java.lang.String getLocalName()
Specified by:
getLocalName in interface javax.servlet.ServletRequest

getLocalAddr

public java.lang.String getLocalAddr()
Specified by:
getLocalAddr in interface javax.servlet.ServletRequest

getAuthType

public java.lang.String getAuthType()
Returns the name of the authentication scheme the server uses, for example, "BASIC" or "SSL," or null if the server does not have an authentication scheme.

The authentication scheme provides a challenge-response model in which the server challenges the client, and the client provides authentication information. Same as the value of the CGI variable AUTH_TYPE.

Specified by:
getAuthType in interface javax.servlet.http.HttpServletRequest
Returns:
a String specifying the name of the authentication scheme, or null if the server does not have an authentication scheme

getCookies

public javax.servlet.http.Cookie[] getCookies()
Returns an array containing all of the Cookie objects the browser sent with this request. This method returns null if the browser did not send any cookies.

Specified by:
getCookies in interface javax.servlet.http.HttpServletRequest
Returns:
an array of all the Cookies included with this request, or null if the request has no cookies

getContextPath

public java.lang.String getContextPath()
Specified by:
getContextPath in interface javax.servlet.http.HttpServletRequest

getDateHeader

public long getDateHeader(java.lang.String name)
Returns the value of the specified request header as a long value that represents a Date object. Use this method with headers that contain dates, such as If-Modified-Since.

The date is returned as the number of milliseconds since January 1, 1970 GMT. The header name is case insensitive.

If the request did not have a header of the specified name, this method returns -1. If the header can't be converted to a date, the method returns an IllegalArgumentException.

Specified by:
getDateHeader in interface javax.servlet.http.HttpServletRequest
Parameters:
name - a String specifying the name of the header
Returns:
a long value representing the date specified in the header expressed as the number of milliseconds since January 1, 1970 GMT, or -1 if the named header was not included with the reqest

getHeaders

public java.util.Enumeration getHeaders(java.lang.String name)
Specified by:
getHeaders in interface javax.servlet.http.HttpServletRequest

getHeader

public java.lang.String getHeader(java.lang.String name)
Returns the value of the specified request header as a String. If the named header wasn't sent with the request, this method returns null. The header name is case insensitive. You can use this method with any request header.

Specified by:
getHeader in interface javax.servlet.http.HttpServletRequest
Parameters:
name - a String specifying the header name
Returns:
a String containing the value of the requested header, or null if the request does not have a header of that name

getHeaderNames

public java.util.Enumeration getHeaderNames()
Returns an enumeration of all the header names this request contains. If the request has no headers, this method returns an empty enumeration.

Some servlet engines do not allow do not allow servlets to access headers using this method, in which case this method returns null

Specified by:
getHeaderNames in interface javax.servlet.http.HttpServletRequest
Returns:
an enumeration of all the header names sent with this request; if the request has no headers, an empty enumeration; if the servlet engine does not allow servlets to use this method, null

getIntHeader

public int getIntHeader(java.lang.String name)
Returns the value of the specified request header as an integer. If the request does not have a header of the specified name, this method returns -1. If the header cannot be converted to an integer, this method throws a NumberFormatException.

The header name is case insensitive.

Specified by:
getIntHeader in interface javax.servlet.http.HttpServletRequest
Parameters:
name - a String specifying the name of a request header
Returns:
an integer expressing the value of the request header or -1 if the request doesn't have a header of this name

getMethod

public java.lang.String getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. The returned String is the same as the value of the CGI variable REQUEST_METHOD.

Specified by:
getMethod in interface javax.servlet.http.HttpServletRequest
Returns:
a String specifying the name of the method with which this request was made

getPathInfo

public java.lang.String getPathInfo()
Returns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the servlet path (the URI of the URL) but precedes the query string. This method returns null if there was no extra path information.

The information this method returns is the same as the value of the CGI variable PATH_INFO.

Specified by:
getPathInfo in interface javax.servlet.http.HttpServletRequest
Returns:
a String specifying extra path information that comes after the servlet path but before the query string in the request URL; or null if the URL does not have any extra path information

getPathTranslated

public java.lang.String getPathTranslated()
Returns any extra path information after the servlet name but before the query string, and translates it to a real path. Same as the value of the CGI variable PATH_TRANSLATED.

If the URL does not have any extra path information, this method returns null.

Specified by:
getPathTranslated in interface javax.servlet.http.HttpServletRequest
Returns:
a String specifying the real path, or null if the URL does not have any extra path information

getQueryString

public java.lang.String getQueryString()
Returns the query string that is contained in the request URL after the path. This method returns null if the URL does not have a query string. Same as the value of the CGI variable QUERY_STRING.

Specified by:
getQueryString in interface javax.servlet.http.HttpServletRequest
Returns:
a String containing the query string or null if the URL contains no query string

getRemoteUser

public java.lang.String getRemoteUser()
Returns the name of the user making this request, if the user has logged in using HTTP authentication. This method returns null if the user login is not authenticated. Whether the user name is sent with each subsequent request depends on the browser. Same as the value of the CGI variable REMOTE_USER.

Specified by:
getRemoteUser in interface javax.servlet.http.HttpServletRequest
Returns:
a String specifying the name of the user making this request, or null

getRequestedSessionId

public java.lang.String getRequestedSessionId()
Returns the session ID specified by the client. This may not be the same as the ID of the actual session in use. For example, if the request specified an old (expired) session ID and the server has started a new session, this method gets a new session with a new ID. If the request did not specify a session ID, this method returns null.

Specified by:
getRequestedSessionId in interface javax.servlet.http.HttpServletRequest
Returns:
a String specifying the session ID, or null if the request did not specify a session ID
See Also:
isRequestedSessionIdValid()

getRequestURI

public java.lang.String getRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. For example:
First line of HTTP request Returned Value
POST /some/path.html HTTP/1.1/some/path.html
GET http://foo.bar/a.html HTTP/1.0 http://foo.bar/a.html
HEAD /xyz?a=b HTTP/1.1/xyz

To reconstruct an URL with a scheme and host, use HttpUtils#getRequestURL, which returns a StringBuffer.

Specified by:
getRequestURI in interface javax.servlet.http.HttpServletRequest
Returns:
a String containing the part of the URL from the protocol name up to the query string
See Also:
HttpUtils#getRequestURL

getUserPrincipal

public java.security.Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface javax.servlet.http.HttpServletRequest

getServletPath

public java.lang.String getServletPath()
Returns the part of this request's URL that calls the servlet. This includes either the servlet name or a path to the servlet, but does not include any extra path information or a query string. Same as the value of the CGI variable SCRIPT_NAME.

Specified by:
getServletPath in interface javax.servlet.http.HttpServletRequest
Returns:
a String containing the name or path of the servlet being called, as it is specified in the request URL

getSession

public javax.servlet.http.HttpSession getSession(boolean create)
Returns the current HttpSession associated with this request or, if necessary, creates a new session for the request. Use true for create to create a new session, or false to return the current HttpSession.

If create is false and the request has no valid HttpSession, this method returns null.

To make sure the session is properly maintained, you must call this method at least once before you write any output to the response. Newly created sessions (that is, sessions for which HttpSession.isNew returns true) do not have any application-specific state.

Specified by:
getSession in interface javax.servlet.http.HttpServletRequest
Returns:
the HttpSession associated with this request or null if create is false and the request has no valid session

getSession

public javax.servlet.http.HttpSession getSession()
Returns the current session associated with this request, or if the request does not have a session, creates one.

Specified by:
getSession in interface javax.servlet.http.HttpServletRequest
Returns:
the HttpSession associated with this request

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Checks whether this request has a valid session in the current session context (which is a HttpSessionContext). If the session is not valid, the getSession(boolean) method never returns it.

Specified by:
isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequest
Returns:
true if this request has a valid session in the current session context; otherwise, false
See Also:
getRequestedSessionId(), getSession(boolean), HttpSessionContext

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Checks whether the session ID this request submitted came in as a cookie, rather than from the getSession(boolean) method.

Specified by:
isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequest
Returns:
true if the session ID came in as a cookie; otherwise, false
See Also:
getSession(boolean)

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Checks whether the session ID this request submitted came in as part of the request URL, rather than from the getSession(boolean) method.

Specified by:
isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequest
Returns:
true if the session ID came in as part of an URL; otherwise, false
See Also:
getSession(boolean)

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Deprecated. As of Version 2.1 of the Java Servlet API, use isRequestedSessionIdFromURL() instead.

Specified by:
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequest

isUserInRole

public boolean isUserInRole(java.lang.String role)
Specified by:
isUserInRole in interface javax.servlet.http.HttpServletRequest

getRequestURL

public java.lang.StringBuffer getRequestURL()
Specified by:
getRequestURL in interface javax.servlet.http.HttpServletRequest

getFileNames

public java.util.Enumeration getFileNames()
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.

Returns:
the names of all the uploaded files as an Enumeration of Strings.

getFilesystemName

public java.lang.String getFilesystemName(java.lang.String name)
Returns the filesystem name of the specified file, or null if the file was not included in the upload. A filesystem name is the name specified by the user. It is also the name under which the file is actually saved.

Parameters:
name - the file name.
Returns:
the filesystem name of the file.

getContentType

public java.lang.String getContentType(java.lang.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.

Parameters:
name - the file name.
Returns:
the content type of the file.

getFile

public java.io.File getFile(java.lang.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.

Parameters:
name - the file name.
Returns:
a File object for the named file.