This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes Every instance of the portlet uses the same copy of the variables (not intentionally) in Liferay Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "Every instance of the portlet uses the same copy of the variables (not intentionally) in Liferay" Watch "Every instance of the portlet uses the same copy of the variables (not intentionally) in Liferay" New topic
Author

Every instance of the portlet uses the same copy of the variables (not intentionally) in Liferay

Al Razor
Greenhorn

Joined: Mar 08, 2010
Posts: 16
Hi,

I have a small logistics-related portlet in Liferay 6.0.6.
I got the following problem: it seems that every instance of the portlet uses the same copy of the variables. Even when I change user, I still receive the same information that the last user has selected.
Maybe you could help me to find what causes it?

Here is the necessary information (please remember that it is just a working copy ):
Main Java file (I left out additional function because they are unrelated in this case.


view.jsp (the only JSP I got) only contains JSTL and a bit of JavaScript



XML configs.

portlet.xml



liferay-portlet.xml



Thanks for any help!
Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 189

You're setting an awful lot of request attributes. Are you using a new instance of the browser between testing sessions?
Al Razor
Greenhorn

Joined: Mar 08, 2010
Posts: 16
Guy deLyonesse wrote:You're setting an awful lot of request attributes. Are you using a new instance of the browser between testing sessions?


Hello Guy,

Yes, I always remove cookies and session after each test.
Also, I was able to solve this problem by removing class members and moving the logic to processAction.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Every instance of the portlet uses the same copy of the variables (not intentionally) in Liferay
 
Similar Threads
set checkbox "checked" when a value in an selectbox changes
Implementation of google charts in JSP
Comparing values using JSTL
method showing different returns when declared on JSP or Servlet
DIV Tag Loading Behavior is Erratic