struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitrii CRETU <>
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:

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

4.  struts-config.xml (when using Validator)
    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">

j> Is there a way to specify a struts app not to create a session object?

Best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message