"Hunter, Roger" wrote:
>
> I need some help calling a servlet from a servlet.

>
> To call the common servlet I then do:
>
> Object o = myServletContext.getAttribute(commonServlet.KEY);
> commonServlet varObject = (commonServlet) o;
> varObject.doAction(request,res);
>
> This way seems a bit messy. The common servlet must be called once before it
> can be used to run init().
For what you seem to be doing J2EE (jsp/servlet & EJB) seems more
apropriate. The sole purpose in the life of a servlet should be
rendering the user interface. Your business logic should not be inside a
servlet, it shoulde be inside other classes that provide the information
to the servlet on what exactly to render to the client. In your case you
will need statefull session beans or maybe entity beans sto hold the
userinformation.

sven

--
======================================================================================
Sven van 't Veer                                              http://www.cachoeiro.net
Java Developer                                                      [EMAIL PROTECTED]
                                        _/_
The answer                             /   \
    to the ultimate question        nnn|.
.|nnn                                     42
=========================================U============================================

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to