MollyPages.org
"You were wrong case. To live here is to live." |
Pages /
Database /
Forms /
Servlet /
Javadocs
/
License & Download /
Tutorials /
Cookbook
/
Contact & Hire
|
Internally, a servlet RequestDispatcher is used for the forward. If a included file name is absolute (begins with a '/'), then it is relative to the servlet webapp, otherwiser it is relative to the current page.
As per the servlet API, if the response for this page has already been committed an exception will be thrown. Use/adjust page buffer sizes appropriately.
[forward filename]Quotes around the filename are optional.
The name of the forwarded file can contain expressions and hence be generated dynamically. For example:
[[ int i = 3; ]] [forward 'foo[=i].html' ]will forward to a file called
foo3.html
in the page.
Note: To forward to anothor page from within java code sections (for example, in cases of errors, missing parameters, etc.), use a servlet request dispatcher directly. For example:
RequestDispatcher rd = req.getRequestDispatcher("/whateverpage.mp"); rd.forward(req, res); return;This is an area of improvement whereby we allow a variation of the the forward tag inside code sections as well, send me a patch if you can do this.