This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes ServletBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletBean" Watch "ServletBean" New topic


prakash muthu
Ranch Hand

Joined: Sep 06, 2000
Posts: 75
I created a servletBean. I want to access the properties from other servlets. Can any one help me regading that problem.
with regards

Prakash.M<BR>Bangalore- India<BR>(
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
If you want to share use of one servlet's info with other servlets withing a single ,whole web application, put the info in 'ServletContext' like the following.

And grab the info in other servlets like this.

The above is a code snippet from one of my working web application, where one servlet creates the database connection pool and others just use it.
maha anna
I agree. Here's the link:
subject: ServletBean
Similar Threads
how to create statefull session bean in netbeans 6.9.1
Beans in JavaWebServer
How to execute a Servlet Bean?
How to run java beans in JWS?