struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitrii CRETU <dcr...@fromru.com>
Subject Re: no sessions
Date Wed, 08 Dec 2004 19:20:03 GMT
Hello josh,

this is the way we do it:

How to prevent struts application from session creation
=======================================================

You must prevent calls to "request.getSession()" (<==> request.getSession(true))
method wich creates HttpSession if it does not exist.

1.  Add to all *.jsp the directive
      <%@ page session="false" %>

2.  struts-config.xml:
      controller.locale=false

3.  struts-config.xml:
      action.scope=request
    
    If action.scope=session --> HttpSession is created via request.getSession()

4.  struts-config.xml (when using Validator)
      action.validate=false
    
    If action.validate=true --> Validator gets locale from session
    by calling request.getSession()

5.  *.jsp when using "html:html" custom tag:
      <html:html locale="false">

NB: in 1.2.4 the #5 can be acheaved by smth like this (not sure, check
    documentaion of html:html):
                 <html:html lang="false">


HTH,
Dima.
                 
      
j> Is there a way to specify a struts app not to create a session object?




-- 
Best regards,
 Dmitrii                            mailto:dcretu@fromru.com



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


Mime
View raw message