wood burning stoves*
The moose likes Servlets and the fly likes How to instantiate Bean in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to instantiate Bean in servlet" Watch "How to instantiate Bean in servlet" New topic
Author

How to instantiate Bean in servlet

Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi!
I'm doing a web application using jsp's. How do i instantiate a bean in a servlet (controller).
Regards
Danish Shaukat
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Just like creating any other object.
MyBean b = new MyBean();
AFAIK the servlet api does not provide any shortcut initialization like the JSP <jsp:setProperty ....>
(but that is rather inefficient anyway)
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to instantiate Bean in servlet
 
Similar Threads
Instantiate a bean in a servlet
JSP to EJB
bean use
how to get the values in a servlet? the values are set in a bean using jsp
Page Beans