MincronJoe
Programmer
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
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