|
Home
Download
Installation Docs
API Docs
Taglibs
Acknowledgements
Mailinglist
DeliveranceMail
|
Destination
The destination object is a replacement for the request and response
objects.
Constructor = public Destination(Map properties, MyJasper server)
There is a public Constructor, normally this is done for you when you
call engine.getObject("jspfile.jsp"); .You can call engine.getObject("jspfile.jsp",destination);
if you want to, to maintain a handle on the Destiantion in the code that
calls the JSP.
Methods to call in a JSPTemplate
destination.getCalledUri(); gets the string you supplied
in the getObject (but available in the JSP)
destination.setSession(HashSession session); replace
the session for this destination only (not the whole server)
destination.getServer(); get a handle on the engine that
creates the jsp
destination.getWriter(); get the StringWriter to which
data is being written
destination.getOutputStream(); get the StringWriter with
an OutputStream wrapper
destination.getSession() returns the HashSession (you
can also use session)
destination.getParameter(String key); get a parameter
similar to a request parameter but any object passed by the engine
destination.getOutput(); gets the result of the page,
returned as a String not a Stream so watch out for generating really
big JSP output because it is stored internally in its entirity
destination.forward(String jsp) throws JspEngineException;
forward to anotherJSPTemplate (does not work if you give it a URL) (yet)
destination.include(String jsp) throws JspEngineException;
include another JSPTemplateP (does not work if you give it a URL) (yet)
|
|