Try to copy the line
<jsp:useBean id="loginHandler" class="LoginBean" scope="session"/>
and paste to the second file.
-ming
Wong Mary wrote:
> Hello,
>
> I have a jsp with various form inputs. The inputs are mapped to bean
> properties. I want to start processing the form only after all the
> submitted properties are set. To achieve this effect, I am specifying
> a helper jsp as the form action in the jsp which submits the input.
>
> Let's take login as an example.
>
> in login.jsp:
> ...
> <jsp:useBean id="loginHandler" class="LoginBean" scope="session"/>
> ...
> <form method=post action=authenticate.jsp>
> User name: <input type=text name=username>
> Password: <input type=password name=passwd>
> <input type=submit value="Submit">
> </form>
> ...
>
> in authenticate.jsp:
> <html>
> <%
> loginHandler.processRequest();
> %>
> <%@ include file ="login.jsp" %>
> </html>
>
> If I process the 2 pages as they are, the "loginHandler" in the 2nd page
> will be tagged as undefined parameter or class during page compilation.
> What is the proper way to convey the sharing of this parameter.
>
> Also, is this approach of using the form action in the first jsp to
> ensure entry to backend processing only after setting necessary states
> a valid way to go? Or are there better ways to go about it? (BTW, all
> this similates the afterSet() used in ATG Dynamo.)
>
> Thanks,
> -Mary
>
> ===========================================================================
> 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
===========================================================================
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