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 components

Status
Not open for further replies.

rubikov

Programmer
Sep 30, 2004
3
PL
Hello,
I am wondering whether is possible to create session PB components?

I mean about something like creating reference to EAServer component in JSP
code, setting an instance value in this component and after redirection to
another JSP page (in the same session) getting this value.

Of course if we open the same pages (e.g. the second JSP page - which
retrieves data) in different browser's window (another session) we should't
see data which has been set in other sessions.


Thanks rubikov
 
Well.. u can pass the variable values in the request
scope.... like

<%
request.setAttribute("somevar", new Integer(12));
%>

the above code shd be in the JSP... in the second JSP u can get the value by using

<%
int iValue = Integer.parseInt(request.getAttribute("somevar").toString());

%>


Check this out... it shd work


u can either set it to request scope or session scope....
so in that case use session wherever u are using request

Let me know in case u have any other doubts on the same..
Anjali
 
Thank you!
I works, in the same way I can insert reference to the PB component into HTTP request/session objects.

best regards rubikov
 
yep i think u shd be.. well check it out and let me know in case u come across any probs

Anjali
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top