i need to transfer data from 1.jsp to 2.jsp
there will be checkboxes and radio buttons and drop downs which i need to pass from 1.jsp to 2.jsp, then ill use that data in 2.jsp to generate the proper page
is there a way of doing so without passing that info through the url?
heres my fiddle for the form: http://jsfiddle.net/S2SxN/10/
so if i have a form with a radio button id=”extra” i can get the value of it when i submit it in 1.jsp to 2.jsp right?!?
1.jsp:
<form name="form1" id="form" action="/2.jsp">
<table>
<tr>
<td>I am interested in:</td>
<td><input type="radio" name="choice" value="consume" id="con"/> Cosuming and/or distributing OTC Markets data
</td>
</tr>
<tr>
<td></td>
<td><input type="radio" name="choice" value="extranet" id="extra"/> Providing connectivity to OTC Markets(Extranet)</td>
</tr>
<tr>
<td>
<input type="reset" id="re">
<input type="submit" id="sub" value="Submit">
</td>
</tr>
</table>
</form>
2.jsp:
<% if(request.getParameter("extra") != null) { %>
<h2>you selected <%= request.getParameter("extra") %></h2>
<% } else { %>
<h2>you selected <%= request.getParameter("con") %></h2>
<% } %>
some reason im getting the “con” result and not the “extra”, when i do get the “con” result is it null…
what am i doing wrong???
Submit the form to 2.jsp as a post and get the values back out of the post data. Or is that not what you mean?