all set. I was an idiot. Vishu helped me. don't bother replying.

On 23 Aug 2000, at 9:41, Rick Reumann wrote:

> This still is not working. In the following you'll see three very
> short pieces of code. What I don't understand is how come I can not
> use <jsp:getProperty name="beanname" property="propname"/> to pull
> stuff out of a session bean? It pulls the information out of the bean
> but these values were not correctly updated from the previous page
> that has request scope and should have set the values based on the
> form submission. I was under the impression that if the bean has
> matching set and get methods that match the form value names that the
> bean would automatically be updated? If someone could look at the
> following code I'd much appreciate it (very short). Everything works
> fine until you get to the more_results page. This page for some reason
> does not have the values that were set in the form. any help much
> appreciated. THanks.
>
> ****1st Page. formtest.jsp  ********
>
> <%@ page import = "FormProcessor" %>
> <jsp:useBean id="sample" class="FormProcessor" scope="session" />
> <HTML><FORM ACTION="results.jsp" METHOD="post"> Name:<INPUT
> TYPE="text" NAME="name" VALUE=""> <BR> Phone:<INPUT TYPE="text"
> NAME="phone" VALUE="">  <BR> <INPUT TYPE="submit" VALUE="Submit"><BR>
> </FORM></HTML>
>
> **** 2nd page form is submitted to. results.jsp ******
>
> <%@ page import = "FormProcessor" %>
> <jsp:useBean id="sample" class="FormProcessor" scope="request">
> </jsp:useBean>
> <jsp:setProperty name="sample" property="*"/>
> <HTML>
> NAME:<font face="arial"><jsp:getProperty name="sample"
> property="name"/></font><BR>
> PHONE:<jsp:getProperty name="sample" property="phone"/><BR><BR>
> <a href="more_results.jsp">more results</a>
> </HTML>
>
>
> **** 3rd page more_results.jsp - not giving me the correct values
> submitted by the form.*******
>
> <%@ page import = "FormProcessor" %>
> <jsp:useBean id="sample" class="FormProcessor" scope="session">
> </jsp:useBean>
> <HTML>
> More Results<BR>
> Name:<font face="arial"><jsp:getProperty name="sample"
> property="name"/></font><BR>
> Phone:<jsp:getProperty name="sample" property="phone"/><BR>
> </HTML>
>
> ****END *****
>
> thanks
>
> On 22 Aug 2000, at 18:42, Vishu G wrote:
>
> > I guess the code inside <jsp:usebean> and </jsp:usebean> is executed
> > only if that bean is instantiated.for session since that bean might
> > have been instantiated already,the code inside will not be
> > executed.if you move the <jsp:setProperty> out of <jsp:usebean> the
> > properties will be set whenever the page is executed(assuming
> > control reaches it).
> >
> >
> >
>
> ======================================================================
> ===== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to