newbie question about jsp and html

J

Jason

Hi, just a simple question about jsp and html, how can I pass a value between
two jsp pages? For example, when use click 'submit' button at page 1, then
textField 1(page 1) will pass to textField 2(page 2)?

Thanks.
 
S

SPG

If you ar enot using struts (and I suggest you do), then simply stick the
value in the session on submit. Then pull it back out when you need it
 
R

Ryan Stewart

*fixed top post*
If you ar enot using struts (and I suggest you do), then simply stick the
value in the session on submit. Then pull it back out when you need it
That's plain silly. If you have a form on page 1 which submits to page 2,
and in that form you have a text box named "text1" (<input type="text"
name="text1">), then do this in page 2:
<%
String value = request.getParameter("text1");
%>

<form action="someOtherPage.jsp">
<input type="text" name="anotherTextbox" value="<%= value %>">
</form>
 
S

SPG

Ooopss.. and Blush!
Yes, I am sorry for the mis-info. Consider myself reprimanded.

That is becuase I have been using Strunts (and not to very good effect! ;)
and that uses the old FormBean jobbie..)
Cheers for the correction!

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top