Auszug aus der:
JavaServer Pages Specification - Draft

The two JavaServer Pages APIs are defined below:

Appendix A: HttpServiceRequest

Back to JavaServer Pages Specification - Draft

Class com.sun.server.http.HttpServiceRequest

java.lang.Object
   |
   +----com.sun.server.http.HttpServiceRequest

public class HttpServiceRequest
implements javax.servlet.http.HttpServletRequest
extends Object
This class represents an HTTP request. It implements javax.servlet.http.HttpServletRequest. The methods in the HttpServletRequest interface are not shown here. Only methods that have been added to this class that are not in the servlet interface are shown here.


Method Index

o setAttribute(String, Object)
This method stores an attribute in the request context

Methods

o setAttribute
 public void setAttribute(String key,
                          Object o)
This method stores an attribute in the request context
Parameters:
key - a String specifying the name of the attribute
o - a context object stored with the key.

Appendix B: HttpServiceResponse

Back to JavaServer Pages Specification - Draft

Class com.sun.server.http.HttpServiceResponse

java.lang.Object
   |
   +----com.sun.server.http.HttpServiceResponse

public class HttpServiceResponse
implements javax.servlet.http.HttpServletResponse
extends Object
This class represents an HTTP response. It implements the javax.servlet.http.HttpServletResponse interface. The methods in the HttpServletResponse interface are not shown here. Only methods that have been added to this class that are not in the servlet interface is shown here.


Method Index

o callPage(String, HttpServletRequest)
This method is used to serve a page from within a servlet.

Methods

o callPage
 public void callPage(String fileName,
                      HttpServletRequest hreq) throws ServletException, IOException
This method is used to serve a page from within a servlet. A regular HTML page can be served or a JavaServer Pages page can be served. If its a JavaServer Pages page being served, then some context can be passed to it via the request object. The file passed back will be passed with a header directive that will indicate to the browser that this page is not to be cached.
Parameters:
fileName: - The name of the URL that identifies a file that will be used to generate the output and present the content. When the name begins with a "/" it is assumed relative to the document root. When it does not begin with a "/" it is assumed to be relative to the URL that this current request was invoked with.
req: - The HttpServletRequest object of the servlet invoking this method. Typically the content is passed as a bean in the context of the request object.