If you've already set the properties of the bean during processing, why
would you do it again in the jsp? It seems to me that you can just leave out
<jsp:setProperty> if you've done all the processing in the controller
servlet.
Scott Evans
SI&I Training Development
46833 (Ramat Gan)
> -----Original Message-----
> From: Marco M [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 26, 2000 3:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: little doubt
>
>
> hi,
> ok i followed the suggestion to put the Bean in the session..
> but, that means that i should not use it with <jsp:useBean id="myname"
> class="mybean" scope="session" /> ??
> i have strange result every time that i do like that:
> when the servlet is called the first time, it puts into the
> session the
> various bean that must be used.
> then, in some jsp pages, i use
> <jsp:useBean id="mybean"....scope="session" />
> <jsp:setProperty name="mybean" property="*" /> (for getting
> advantage of
> having all the parameters set in the bean instead of looping
> thru various
> parameter)
>
> the problem that i have, is that the Properties in the Bean
> are set when i
> send the request back to the JSP page, in other words after
> processing the
> logic...
>
> anyone can explain me what is wrong??
> thanx in advance and regards
> marco
>
> > -----Original Message-----
> > From: EXT Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: 25. April 2000 18:34
> > To: [EMAIL PROTECTED]
> > Subject: Re: little doubt
> >
> >
> > Marco M wrote:
> >
> > > hi all,
> > > i have a little doubt:
> > > i am using Model 2 architecture along with the <jsp:useBean> tag
> > > in my jsp page, i have <jsp:useBean name="mybean"
> > class="package.TheBean"
> > > scope="request" />
> > > i have also <jsp:setProperty name="mybean" property="*" />
> > > the problem is this:
> > > the Bean represent an user, with all the various properties
> > such as name,
> > > surname ecc..
> > > i must be able to change this information. and store the new
> > > informations....
> > >
> > > using the scope = request, means that, if the page is
> forwarded to a
> > > Servlet, the Bean is available in the servlet if i use
> > > request.getAttribute("mybean") ??
> > > i don't think so, i have tried so many times that at the
> > end i realized that
> > > the bean is not available... but i want to be told that is
> > like that..
> > >
> >
> > As long as you are using <jsp:forward> to forward, and not
> > response.sendRedirect(),
> > request attributes should be available through the remainder
> > of the current
> > request. If you need them to last longer than the current
> > request (or you need to
> > use sendRedirect for some reason) you should store beans in
> > the session instead.
> >
> > >
> > > thanx in advance for your reply
> > > regards
> > > marco
> >
> > Craig
> >
> > ==============================================================
> > =============
> > 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
===========================================================================
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