Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to save objects in session (Struts)

Status
Not open for further replies.

MincronJoe

Programmer
Apr 17, 2009
1
0
0
US
I am trying to save an object in the session. I have tried the following 2 ways:

request = ServletActionContext.getRequest();
session = request.getSession(true);
customer = new Customer();
customer.setValid(true);
customer.setCustomerNumber("564505");
customer.setUserId("JWALTERS");
session.put(Config.CUSTOMER, customer);

AND

ActionContext context = ActionContext.getContext();
session = context.getSession();
customer = new Customer();
customer.setValid(true);
customer.setCustomerNumber("564505");
customer.setUserId("JWALTERS");
session.setAttribute(Config.CUSTOMER, customer);


After control has been returned to the browser and another action is called the session is empty. This app is running on tomcate on an iSeries. It is now sitting behind an apache web proxy. We added an internet DNS entry that points to our web proxy, setup our web proxy to point to the app on the back-end, added firewall rules that allow internet users to connect to the web proxy and removed the firewall rules that were allowing direct access to the app.

It seems like the proxy server is causing each request to appear as a new session.

When I run it on my PC it works fine.

Thanks



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top