Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlets calling Servlets

Status
Not open for further replies.

Mudshark

Programmer
Sep 26, 2000
11
0
0
US
I have two Servlets ("A" and "B") - both reside for the same server on the same machine. I need to call a method residing in Servlet "B" from Servlet "A" and pass back a parameter from the method I called in Servlet "B" to be used by Servlet "A".

I have messed with:
getServletConfig().getServletContext().getServlet("DBService");

and kept getting deprecation errors (and besides, it didn't seem to work!)

What should I be looking at to do? setAttribute()?

Thanks for your time?

> Muds
 
Mudshark,

I would question your design. If you have parts of your system that need to be reused, perhaps they should be beans instead of servlets?

"But, that's just my opinion... I could be wrong".
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top