Cory L Hubert wrote:

>         In the j2ee APM it says you should use your servlets to output HTML.  So
> how do I output HTML after a servler processes a form.
>

Make a real servlet the destination of form submits.

In the servlet, perform the processing required to reflect the submitted request.
This normally requires dispatching to some sort of an action processing class
(analogous to the Controller role in an MVC architecture).

Store the processed data in beans as attributes of the request or session (depending
on how long you need to keep them).

Use a RequestDispatcher.forward() call to pass control to an appropriate JSP page to
display the results.

In the JSP page, use a <jsp:useBean> element to reference the attributes (beans)
that were passed, and use the properties of those beans in the construction of the
displayed page.

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to