store jsp value of one page in another
Posted on 2011-02-16
I had a jsp page and index.jsp
<select name ="getselected" id="getselected">
<input type="hidden" name="hidden" value="<%=getselected%>">
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
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...