this is effectively the design conclusion i came to on past
projects with the addition that i pushed this sort of "core"
logic down to a base HttpServlet class with which most
other application serlvets (which where geered more towards
presentation) extended.
this approach worked well with jws/jhtml but will work
fine with systems comprising of jsp, pure servlets, etc.
hope this helps,
- james
>
> ;)X-Server-Uuid: d41f7050-5e35-11d2-ba46-0000c0b81ac1
> ;)MIME-Version: 1.0
> ;)X-WSS-ID: 1B7066F8769412-01-01
> ;)Content-Transfer-Encoding: 7bit
> ;)Date: Mon, 21 Jun 1999 15:19:24 -0700
> ;)From: Justin Ashworth <[EMAIL PROTECTED]>
> ;)Subject: Re: maintain session in an app with several servlets.
> ;)To: [EMAIL PROTECTED]
> ;)
> ;)All that's really necessary is to call
> res.encodeUrl("/servlet/ServletName")
> ;)when you link to it from another page. Then from within the doPost or
> doGet
> ;)of ServletName, you have the following:
> ;)
> ;) HttpSession session = req.getSession(true);
> ;) if (session.isNew()) {
> ;) res.sendRedirect("/index.html");
> ;) }
> ;) else { // Call your functions here.
> ;) }
> ;)> -----Original Message-----
> ;)> From: jon * [mailto:[EMAIL PROTECTED]]
> ;)> Sent: Monday, June 21, 1999 2:27 PM
> ;)> To: [EMAIL PROTECTED]
> ;)> Subject: Re: maintain session in an app with several servlets.
> ;)>
> ;)>
> ;)> > Hello all,
> ;)> > Does anyone have an example of running an application with multiple
> ;)> > servlets. So far everything I have seen has just one
> ;)> servlet. I am trying
> ;)> > to solve a design issue where I would like to create a
> ;)> session and have the
> ;)> > servlets in the application use that session.
> ;)> > If you can point me to examples I would appreciate it.
> ;)> > Joseph.
> ;)>
> ;)> You should take a look at the Dash framework:
> ;)>
> ;)> <http://www.working-dogs.com/dash/>
> ;)>
> ;)> -jon
> ;)>
> ;)> ______________________________________________________________
> ;)> _____________
> ;)> 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
> ;)
___________________________________________________________________________
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