You can tell Struts not to put a Locale in the session by specifying a "false" value for the "locale" attribute of the <controller> in your struts-config.xml I don't believe there is any place else where Struts will manipulate the session besides if you specify that forms should be in "session" scope.
But the only reason your container would make a new session is if it couldn't find the pre-existing one, which would usually happen if you were somehow failing to return a session ID back to the servlet container.
Joe
At 12:20 PM -0500 1/28/05, Brandon Mercer wrote:
Brad Balmer wrote:
I am using the 1.2.4 release and am finding that when I submit a form to aBrad, This is probably happening in the action class itself. Check for the session.invalidate or something similar. Just a thought.
plain Action, a new HttpSession is automatically created and replacing the
session that I already am using. I have a simple search form where when the form is initially brought up, the
reset() function gets called and I see from my debug output:
10:47:05,645 INFO [STDOUT] SearchForm.reset()
10:47:05,645 INFO [STDOUT] ***** sessionBean
10:47:05,645 INFO [STDOUT] ***** org.apache.struts.action.LOCALE
Showing that my sessionBean is in the session. Once I complete the form and submit it, my debug log shows that a new session is created BEFORE the form is even validated (using a listener I wrote):
10:47:14,603 ERROR [MySessionListener] sessionCreated: 2005-01-28 10:47:14,603 ERROR [MySessionListener] attributeAdded: org.apache.struts.action.LOCALE 10:47:14,604 INFO [RequestProcessor] ***** org.apache.struts.action.LOCALE 10:47:14,604 INFO [STDOUT] SearchForm.reset() 10:47:14,604 INFO [STDOUT] ***** org.apache.struts.action.LOCALE 10:47:14,605 INFO [STDOUT] SearchForm.validate() 10:47:14,605 INFO [STDOUT] ***** org.apache.struts.action.LOCALE
Here is my config: <action path="/search" name="searchForm" scope="request" input="/jsp/search.jsp" validate="true" type="app.featuredbrands.action.SearchAction"> <forward name="multiple" path="/jsp/searchResults.jsp"/> <forward name="single" path="/jsp/crud.jsp"/> <forward name="failure" path="/jsp/search.jsp"/> </action>
Any ideas?
Thanks.
Brandon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]