Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Seting a JSp variable to session scope in JSp page itself

843838Dec 21 2005 — edited Dec 21 2005
Hi,

I have code like this

<HTML>
<HEAD>
<TITLE>Change Password</TITLE>



<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet/vclinical.css" TITLE="Style">
</HEAD>
<BODY>
<form name="form">
<select name="ss" onChange="this.form.qq.value=options[selectedIndex].value;getit()">
<option value=1>ss1</option>
<option value=2>ss2</option>
</select>

<input type="text" name="qq" value="">


<%
String asd=request.getParameter("qq");

session.setAttribute("Stored", asd);
System.out.println("value is"+asd);
%>

</form>
</BODY>
</HTML>

here i want to set value of a JSP variable qq to session scope and here i am not invoking any servlet i want value of qq in next JSP page i am not submitting the page so how i can handle this. this code does not work so please tell me how to do this i am using struts frame work
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2006
Added on Dec 21 2005
4 comments
421 views