SilverStream
Application Server 3.5

com.sssw.shr.http
Interface AgiHttpServletRequest

All Superinterfaces:
HttpServletRequest, ServletRequest
All Known Implementing Classes:
AgoHttpRequestEvent

public interface AgiHttpServletRequest
extends HttpServletRequest

This interface extends the standard javax.servlet.http.HttpServletRequest interface with additional SilverStream functionality. It includes two methods to deal with file uploads from HTML pages (provided that an HTML form with a tag of <INPUT TYPE=file> is used to allow the viewer to submit the contents of a file in HTML). Without these methods the attachment would be unavailable with the standard servlet interface because the only method provided for this purpose is getParameter() which returns a String. This will fail if the file is binary (say an image).

Also included is a method to delegate processing to an AgpPage.


Method Summary
 void delegateToPage(AgiHttpServletResponse response, String pageurl)
          Fills in the response by delegating processing to the service method of the specified page.
 URL getDatabaseURL()
          Returns the URL of the database, as in "http://myserv/myDB".
 byte[] getFileContent(String name)
          Returns the file content from an HTML form-field of type <INPUT TYPE=FILE>
 String getFileContentType(String name)
          Returns the file content type (MimeType) from an HTML form-field of type <INPUT TYPE=FILE>.
 Object getParameterAsObject(String name)
          Returns the value of the named HTTP parameter as an Object.
 Serializable invokeBusinessObject(String name)
          Invoke a business object.
 Serializable invokeBusinessObject(String name, Serializable param)
          Invoke a business object.
 
Methods implemented from interface javax.servlet.http.HttpServletRequest
getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid
 
Methods implemented from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getParameter, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getScheme, getServerName, getServerPort, setAttribute
 

Method Detail

getFileContent

public byte[] getFileContent(String name)
Returns the file content from an HTML form-field of type <INPUT TYPE=FILE>
Parameters:
name - Parameter name as a String
Usage:

The file pathname is accessed using getValue for the same Parameter name.

See Also:
AgiHttpServletRequest.getFileContentType(String name)

getFileContentType

public String getFileContentType(String name)
Returns the file content type (MimeType) from an HTML form-field of type <INPUT TYPE=FILE>.
Parameters:
name - parameter name as a String
Usage:

The file pathname is accessed using getValue for the same Parameter name.

See Also:
AgiHttpServletRequest.getFileContent(String name)

getParameterAsObject

public Object getParameterAsObject(String name)
Returns the value of the named HTTP parameter as an Object. The object will either be a String or a string array (String[]) for multi-valued fields. This method provides optimized access avoiding the need to create a String array when there is a single value.
Parameters:
name - the parameter name as a String.

delegateToPage

public void delegateToPage(AgiHttpServletResponse response,
                           String pageurl)
                    throws ServletException,
                           IOException
Fills in the response by delegating processing to the service method of the specified page.
Parameters:
response - the parameter name as a String.
pageurl - the URL specification of the page, as a String, relative to the page-directory. It may begin with "databaseName:"

getDatabaseURL

public URL getDatabaseURL()
Returns the URL of the database, as in "http://myserv/myDB".

invokeBusinessObject

public Serializable invokeBusinessObject(String name,
                                         Serializable param)
                                  throws Exception
Invoke a business object.
Parameters:
name -  
param - -

invokeBusinessObject

public Serializable invokeBusinessObject(String name)
                                  throws Exception
Invoke a business object.
Parameters:
name -  

SilverStream
Application Server 3.5