Thanks Eric:
Now a related question: how can I give redirect command from within the bean,
rather than from within the JSP page. I know I can use the <jsp:forward> in the
JSP page, but I want to do this in a class called using the useBean tag. This
question is analagous to the one below where I wanted to use the bean to output
HTML directly.
Thanks for any help.
Tom Cox
_________________________________________________________
Thomas Cox
Solution Center of the Americas Phone: +1.612.397.4226
400 One Financial Plaza Fax: +1.612.692.4226
120 South Sixth Street Alt Fax: +1.612.397.4370
Minneapolis, MN 55402 e-mail: [EMAIL PROTECTED]
_________________________________________________________
-----Original Message-----
From: [EMAIL PROTECTED]
Sent: Tuesday, September 28, 1999 8:16 AM
To: Thomas Cox
Subject: Re: Output from Bean to JSP file
All you have to do is pass the out object or the response object to the bean
and do something like this in the bean method:
out.println("<BR>Hi");
The JSP scriplet coud be like this:
<%
MyBeanRef.setPrintWriter(out);
%>
Eric Dunstan
VEC 1999
>From: Thomas Cox <[EMAIL PROTECTED]>
>Reply-To: Thomas Cox <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Output from Bean to JSP file
>Date: Fri, 24 Sep 1999 08:06:40 -0500
>
>I'd like to called a bean method from a scriptlet in my jsp that will
>output
>html into the page.
>
>This method will not be related to any existing input field on the jsp by
>name.
>I don't want to use an include file because I want this code centralized in
>the
>bean.
>
>Is there any way to do this, or am I ONLY allowed to put methods in the
>bean
>that relate to existing input fields on the jsp page?
>
>Thank you.
===========================================================================
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