• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Websphere Portal Server - User's seeing each other's data!

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We're experiencing a strange and dangerous behavior in WSP 5.0. We've developed and deployed a set of portlets. These were built as Struts-based stand-alone applications and then later converted to portlets and deployed. The portlets accept user search criteria and then do a database search through a custom-built persistence layer. Then the Action class of the portlet puts the results into session scope and renders the JSP.

The problem is that sometimes, other users logged into the portal will refresh the page that that portlet is on, and see the other user's result set and search criteria. This is not good. =)

We modified our BaseAction class (of which we extend all of our other Action classes), and made it use PortletSession instead of HttpSession. This still didn't help. I'm at a loss here and any help would be greatly appreciated.

Thanks!
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea of portal but tell me that were you facing same problem
when you were using struts.
 
Dan Lastoria
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately we only ran these as Struts applications in a local test environment. So we never had a multi-user/concurrency test on an application server. I suppose we could test this out fairly easily.
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok !

hope you are implementing reset method in your action forms.
 
Dan Lastoria
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if we are, can you explain?
 
Dan Lastoria
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually we do have an implemented reset method on the only action form of the application. But maybe your explanation would still help me.

Thanks!
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In struts framework only one instance of ActionForm is created and same is shared among all user.

Whenever there is a request related to action form is recived by controller servlet conrotter servlet calls the reset method of action form.

by default reset method does nothing we have to override it to get desired result (like reseting values to blank or their initial value).

I dont know this applies to portlet as i told you that I have no idea of portal.

It was just a gray thought that for a new user value that is set earlier being displayed.
 
Dan Lastoria
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It ends up that our problem was that we were using a custom "base" action class. Within that class we defined an instance variable to reference the session. Apparently that was causing the problem.

Our problem is resolved, but does anyone care to elaborate on why this is a problem?

Moderator: Can this be moved to the Struts forum?
 
reply
    Bookmark Topic Watch Topic
  • New Topic