Hi Rashmi,
Be specific, are you talking about application specific beans ? the one with getter and setter methods ?
Since it is like the Java Class, you can keep it in your package.
Please take a look below.
i have a package called com.xx.yy.beans. i have so many beans in it. I require the following four beans in one servlet.
Step 1 Import the package in the servlet.
Step 2. In servlet where you initialize this, either in the init() method ?
For Example the following is a bean code.
I need this to be in my servlet. Say a HttpServlet.
This is how i access the Bean.
I hope this would make you understand much better.
I believe you are trying in eclipse. A suggestion, Do not create servlet class in eclipse using the template that is the wizard. Create a general class and add the methods one by one.
Regards,
Ronald Reagan Jr.