Hi Macro,..
For that u just keep the code ( <jsp:useBean name="mybean"
class="package.TheBean"
scope="request" />) which will instantiate the bean class in a separate file...
(U can name that file either as 'declaration.jsp' or 'declaration.inc' ---later one
is considered to be the
standard..!!) Then include that file in other JSP files... using include
directive...otherwise it will not be available
in other pages even if it's scope is 'request'...
Bye..
Sanju
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..
>
> thanx in advance for your reply
> regards
> marco
>
> ===========================================================================
> 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