This week's book giveaway is in the Open Source forum.
We're giving away four copies of RabbitMQ in Depth and have Gavin Roy on-line!
See this thread for details.
The moose likes Servlets and the fly likes Calling a Java class file from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling a Java class file from a servlet" Watch "Calling a Java class file from a servlet" New topic
Author

Calling a Java class file from a servlet

Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
I am developing an application in which a servlet has to call a Java class.
Is this possible...

i tried using a request dispatcher, but this can be used only to call a servlet. Please help
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I guess it depends on what you mean by "Call another Java Class".
Servlets routinely instanciate and call methods in external classes called Javabeans.

Can you explain more fully what it is that you're trying to do?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Consider Paul's rocket mass heater.
 
subject: Calling a Java class file from a servlet