This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes calling bean from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "calling bean from a servlet" Watch "calling bean from a servlet" New topic

calling bean from a servlet

Nidhi Singhal
Ranch Hand

Joined: Sep 19, 2004
Posts: 89

i have servlets and some bean classes containing business logic. i want to know how to call beans from a servlet.
Sandeep Deshmukh

Joined: Dec 06, 2004
Posts: 16
Hi nidhi

To use a bean include that bean package in your classes directory, import that package into servlet and you can use the bean classes as you do in jsp.


Java and Oracle Programmer
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
It is the same as you use beans in your simple normal java class.
Nidhi Singhal
Ranch Hand

Joined: Sep 19, 2004
Posts: 89

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: calling bean from a servlet
jQuery in Action, 3rd edition