dcsimg
getting session attribute from jsp into servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abha_Salhotra
Posted On:   Tuesday, April 13, 2004 02:01 AM

my question is as follows:

i have one jsp file, which gets a variable value through session. now i want to pass that session variable to a servlet.

in jsp, i am getting the session variable as:

-- String name = (String)session.getAttribute("name"); --
now i want to pass "name" variable to a servlet.

how should i do it?
thankx in advance

Re: getting session attribute from jsp into servlet

Posted By:   Amir_Pashazadeh  
Posted On:   Tuesday, April 13, 2004 05:58 AM

Hi


Just the same way!


You can access HttpSession instance inside a Servlet by calling HttpServletRequest.getSession(). And then you can access session attributes.


Amir Pashazadeh

About | Sitemap | Contact