struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andy wix" <stix...@hotmail.com>
Subject Stateless web apps
Date Mon, 23 May 2005 11:18:04 GMT
Hi,

I am working at a place that doesn't use session state for their web apps.
The reason given is that they have 2 physical servers and 2 Oracle 
Application Servers running on each of these machines for failover.  From 
the little I know about clustering, I thought that if everything in the 
session implements Serializable then session state is tranparently valid 
accross requests - even if you end up on another jvm.

Has anyone else ever heard of this restriction - I can see problems e.g., 
can't use Struts tokens to defeat the usual refresh problems.

More immediately, I have a problem with a typical scenario.  My normal 
approach is:
I have a 'preload' action that gets an ArrayList of data from the db and 
sets this in the session.
Then forward to the jsp that displays this stuff.
This page has something like:

<c:forEach var="wrap" items="${Assignments}" varStatus="status">
<TR>
  <TD><c:out value="${status.index+1}"/></TD>
  <TD>
    <c:url var="viewApp" value="/viewNode.do">
      <c:param name="indexPos" value="${status.index}" />
    </c:url>
          <html:link href="${viewApp}">
            <c:out value="${wrap.applicationVO.applicationName}"/>
          </html:link>
  </TD>

This gives me an index of the link that was clicked and in the next action I 
simply look this value up from the ArrayList in the session.

Does anyone know how this functionality could be achieved without using the 
session?

Thanks,
Andy

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message