could you give me the source code to instantiate a javaBean in the servlet in order to use the Bean later in an Java Server Page?
in fact i create a servlet that must instanciate a javaBean and initialize their properties that they will be accessed by a JSP.
Thinks
-
javaBean and Servlet (2 messages)
- Posted by: anis ben mustapha
- Posted on: August 21 2000 11:18 EDT
Threaded Messages (2)
- javaBean and Servlet by devendra Singh on August 22 2000 03:41 EDT
- javaBean and Servlet by devendra Singh on August 22 2000 03:52 EDT
-
javaBean and Servlet[ Go to top ]
- Posted by: devendra Singh
- Posted on: August 22 2000 03:41 EDT
- in response to anis ben mustapha
Hi anis,
Calling EJb in servlet is as we do generally in client.
In servlets init method you can create initial context and then do the lookup. -
javaBean and Servlet[ Go to top ]
- Posted by: devendra Singh
- Posted on: August 22 2000 03:52 EDT
- in response to devendra Singh
Hi anis, sorry for breaks. i pressesed reply accedently.
So where we were.
After doing lookup in init.
you can code the calls to homeinterface and remoteinterface as we do in the normal java program. Only difference is that these will be in doGet() or doPost() method of the servlet.
I hope it will help you. I will try to give you sample code tomorrow.