> 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.
> }
Right, but why would you want to put that same exact code into each and
every servlet that you have? What happens to your security if you forget to
add that to just one single servlet?
The point of the Dash framework, which you missed, is that you have a single
servlet that maintains all of your security for the rest of your "servlets".
Dash does some other cool stuff such as abstracting the "rest of your
servlets" into something a bit more powerful and easier to manage, but the
main point is that it is a waste of time to put that code into each and
every servlet.
Dash also comes with a class that wraps around encodeUrl() that extends the
method a bit further to make building dynamic uri's much easier.
<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