Link to home
Start Free TrialLog in
Avatar of shragi
shragiFlag for India

asked on

store jsp value of one page in another



I had a jsp page and index.jsp


<form method="post">

<select name ="getselected" id="getselected">
<option>fox</option>
<option>fox2</option>
<option>fox3</option>
</selected>

<input type="hidden" name="hidden" value="<%=getselected%>">

</form>


 
which had a drop down list...
I get that value in server...
and set it to request

String selected_value = request.getParameter("getselected");
request.setAttribute("selected_value", selected_value );



now in index2.jsp

I imported this class and

used

Selected is <%=request.getAttribute("selected_value") %>


I got the value, i mean i got the output something like
selected is fox

but once i reload the page

I get output like

selected is null

how to store the value and when value is changed in index.jsp how to
reflect it in index2.jsp automatically...

ASKER CERTIFIED SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial