Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

jsp, containers, beans and persistence
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.


Report this thread to moderator Post Follow-up to this message
Old Post
milkyway
12-14-04 02:06 PM


Re: jsp, containers, beans and persistence
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

milkyway wrote:
> 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.
>

Report this thread to moderator Post Follow-up to this message
Old Post
Rogier R. Spaans
12-14-04 09:06 PM


Re: jsp, containers, beans and persistence
Hello,

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


Report this thread to moderator Post Follow-up to this message
Old Post
milkyway
12-16-04 09:05 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:40 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.