Okay, I have a servlet, a bean, and a jsp page.
Call the servlet by this url:
/servlets/TestServlet?val=1
The servlet is set up like this:
...
int val = new Integer( req.getParameter("val") ).intValue();
ValueBean vBean = new ValueBean();
vBean.setValue( v );
response.sendRedirect("finished.jsp");
...
The bean has the following methods:
...
public int getValue(){
return val;
}
public void setValue( int v ){
val = v;
}
...
The finished.jsp page has the following:
...
<jsp:useBean id="valBean" scope="request" class="test.ValueBean" />
<jsp:getProperty name="valBean" property="value" />
...
The page returns:
0
So, I'm trying to figure out if there's a scope issue or something
because I should get a 1 displayed on the page instead of a 0.
When you do a call redirect page from a servlet, I'm assuming it loses
the bean that it was working on so when the jsp tries to use it, it's
getting a new instance.
Is there any way besides a session object to carry that bean over from
the servlet that created it to the jsp that needs to display it? I mean,
this is the whole deal about model 2.
Hopefully this makes sense.
Thanks,
Jason
===========================================================================
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