hi all!
   i just downloaded the early JSP Tutorial chapters.  In the chapter
for handling forms, the hellouser example uses an include directive
to show the submitted name.
 
    i was wondering: is it possible to specify a 'submit' action that goes
to a different .jsp page, and show the submitted name on that page??
 
here's what i have right now, but i get a Cannot Compile error for show.jsp
 
is there a way to get it to work?
(Note: adding <jsp:useBean id="myNameHandler" scope="session" class="myForm.NameHandler"/>
right before i do the getProperty doesnt help)
 
getName.jsp
--------------------
 

<html>

<body>

<jsp:useBean id="myNameHandler" scope="session" class="myForm.NameHandler"/>

<jsp:setProperty name="myNameHandler" property="*"/>

<form method=get action=showName.jsp>

Your Name: <input type="text" name="username" size=25><br>

<input type="submit" value="Submit">

<input type="reset" value="Reset">

</form>

</body>

</html>

 

 

showName.jsp

------------

<html>

<body>

Hello, <jsp:getProperty name="myNameHandler" property="username" />!

</body>

</html>

 

Reply via email to