Solved

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

Posted on 2002-07-23
2
249 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Today’s effective marketing is about coming down to the customers’ level and engaging in a whole new way. A text message is one of the most effective and influential ways that you can engage your customers. Here are eight ways that you can utilize t…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 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