Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Variables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a session variable passing through my JSP pages but i want to use this session variable in an SQL query within a Java bean. How do I send this variable from a JSP page to the corresponding java bean.

I know I have it because I used this line in my JSP page and hello,alison came out

hello,<%= session.getAttribute(&quot;username&quot;)%>

I tried sometning like this but it wouldnt work

beanId.setSessionName( request.getParameter(&quot;username&quot;) );
 
Hello,

Looks like to me as if you mixed up the 'request' and the 'session' Object !
You set the attribute to the session object but you tried to read it from the request object !

by
guenter guenter
mail: porzer_guenter@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top