Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / December 2004

Tip: Looking for answers? Try searching our database.

jsp, containers, beans and persistence

Thread view: 
milkyway - 14 Dec 2004 08:12 GMT
Hello there,

I have heard that one can set a .jsp page so that the content is valid
over an entire session. Is this true? Are there any examples where one
may see this?

Also, if it is true, then has anyone come across any problems with the
use of the Tomcat container to pass variables for use from one jsp page
to another? Are there any limits to what the container can hold - for
example, if I have 5 jsp pages:

first.jsp
second.jsp
third.jsp
fourth.jsp
fifth.jsp

and I use a setName for first.jsp, can use a getName on fifth.jsp
(assuming that the variable is in the cloud called "the container"
somewhere)?

I hope I am making sense ;-)

Kindest Regards.
Rogier R. Spaans - 14 Dec 2004 19:15 GMT
Hi,
I don't know if I really understand your point, but I think you're
refering to the 'scope' of a variable. A web container has three
different scopes: request, session an application.
Request is only present during the processing of a single request.
Session parameters are available during the lifetime and in the context
of the session, and application parameters are valid, and shared over
multiple sessions within the context of the application.
In your jsp you can use request.getParameter("name"),
session.getParameter("name") and application.getParameter("name").

regards,
Rogier Spaans

> Hello there,
>
[quoted text clipped - 20 lines]
>
> Kindest Regards.
milkyway - 16 Dec 2004 13:46 GMT
Hello,

Thank you for the information. This clears up quite a bit for me ;-)
Kind Regards.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.