Re: <p>!_NEWLINE_!Passing a parameter from one servlet to another
Posted By:
Mittal_Bhiogade
Posted On:
Monday, December 17, 2001 01:55 AM
anything u put in session is available until your session is terminated (i.e. the browser is closed or session is invalidated)
u can put in session as follows...
HttpSession obj= req.getSession(true);
obj.putValue("usename","ABC");
obj.putValue("password","XYZ");
Now u have put the data in session in say "ServletA", this data can be "get" in any of the subsequent servlets or jsp as follows,
HttpSession obj= req.getSession(true);
String strUserName=(String)obj.getValue("usename");
String strPassword=(String)obj.getValue("password");
Hope this helps...