David Wall wrote:
>> Does anyone have any advice on a good way to handle the situation where a
>> user bookmarks pages in your web app that require data from previous
> entries
>> in it's session attributes?
>
> This can be tricky, but you may see if you can structure things early on to
> not require things be stored in the session. It may be heresy, but holding
> things in sessions can be a real mistake in the web world. For one thing,
> sessions generally time out, so if someone goes to your page, then goes to
> the bathroom or lunch and then tries to continue, they will usually get an
> error. Also, holding too much in a session means that your site will not
> scale up -- which is not a problem for many sites that really don't have so
> many visitors (let's face it, 90% of the traffic is going to only 10-20
> sites, so most people really don't have sites that generate that much
> traffic -- possibly on a few thousand per day when they are doing okay).
How do you figure that using sessions doesn't allow a site to scale up? I
mean, I can easily see needing SMP, 1GB of RAM and 5 machines for load
balancing but where are you getting that information from? As for sessions
timing out, that's a good thing. It's trivial to just make any servlets use
request.getSession(false) and if the result is null, redirect them to a page
that explains that the session is timed out, why that is the way it is and
then that they need to start from the beginning of the application.
> The best bet is to remain context free.
I'm not sure how you successfully do that unless you rely completely on URL
rewriting which is not what I would consider an elegant way to create
extensible dynamic content. Who says that Java Server Toasters will support
URL rewriting anyway :-)
Mike
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html