?
Solved

Does jsp bean (non-ejb) result seperate instance?

Posted on 2002-07-23
2
Medium Priority
?
250 Views
Last Modified: 2010-04-01
Hello,

If I have a jsp bean (non-ejb) that is called by a jsp, will the values that I set in the bean be available to all jsp's... or does a call to a jsp result in a seperate instance of the bean particular to the called jsp instance?

In other words, say I had a bean in which I set the oracle connection. Would each jsp call the bean and be able to set it's own unique connection or would each call to the bean overwrite the other beans connection value?

THanks,
Keith
0
Comment
Question by:keithedward
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 total points
ID: 7174400
It depends on the scope of the bean.

If you use the "session" scope the bean will be available to other JSP for that particular user.  

If you use "page" it is available to that JSP only (page is the default).  

If you use "request" then it is available to that JSP and any JSPs it includes/forwards to.

If you use "application" scope then it is available to all JSPs for all users.

Also keep in mind if you have multiple servers than session and application are specific to that server/jvm unless you architect it otherwise.

CJ

0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7175005
Glad I could help and Thanx for the "A".

CJ
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question