aspose file tools*
The moose likes Struts and the fly likes what good is a struts framework without session support? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "what good is a struts framework without session support?" Watch "what good is a struts framework without session support?" New topic
Author

what good is a struts framework without session support?

Ed Chawlik
Greenhorn

Joined: Aug 10, 2005
Posts: 16
I have come to realize that struts really cannot properly deal with session support since browsers seem to adversely, or at least inconsistently, affect servelet sessions.

As posted earlier, you get the same session ID opening my struts application in two instances of Netscape 7.2, but with MS Explorer you get two different sessions. The problem is that when you get the same session in two browser windows in Netscape, one clobbers the variables in the other.

struts does not seem to be able to deal with this. Does anybody know otherwise?
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
this is like blaming the cars for bad drivers. it's NOT a struts-specific issue. see my reply to your same question on jguru.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Ed Chawlik
Greenhorn

Joined: Aug 10, 2005
Posts: 16
I appreciate at leaset getting the reply...

This was the reply:

�alan do, Oct 23, 2005
this is a common issue NOT unique to struts. look at ebay, amazon, dell, buy.com or any other non-struts site and you will find the exact same behaviors....�

It is still a problem for struts, is it not? How would one deal with this in struts. I am beginning to think this is an expired page issue.

Also, it seems that the session is somehow based on the process ID of the browser. Netscape has one process ID for sever browser windows.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
problem FOR struts is not a problem OF struts. you are absolutely correct that this is a problem, but it's not a flaw of struts. struts is a framework that structuralized and simplified your web application development. it's not set out to address every problem of basic web technologies, especially browser issues particular to the multiple sessions dependence on browser usage behaviors.

my suggestion is consider some workflow implementation in your app if you anticipate users opening multiple windows before completing an application/business path. see http://www.livinglogic.de/Struts/ for a struts implementation of workflow. honestly though, 90% of apps are not critical enough (or at least don't care too much) to enforce workflow across sessions if the users are 'odd' enough to launch multiple browsers to do the same thing.
Ed Chawlik
Greenhorn

Joined: Aug 10, 2005
Posts: 16
alan,
Thanks again for the reply, I will look into that extention.
Ed Chawlik
Greenhorn

Joined: Aug 10, 2005
Posts: 16
yep, that will do the trick. Thanks again.
 
jQuery in Action, 2nd edition
 
subject: what good is a struts framework without session support?