Results 1 to 1 of 1
- 05-03-2017, 01:55 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 3
- Rep Power
- 0
Session and attrobutes are lost after user interaction
Hi friends, please help me with this, I have been fighting with this problem for some days and now its urgent for me to get this working.
I have a legacy Tomcat app that uses servlets and JSPs. on Each servlet the user access is being checked by reading a variable from the session. That works great but....
I am invoking an xhtml from the servlet or by typing the url in the browser. When the manager gets in the postConstruct mehod, I can read that session variable and its fine, then I go to the page and type anything into a input, when I check the setter method inside the manager the request.getSession () returns null.
In other words, the session variable inside the given request exists only in the postconstruct but after any interaction with the user the request variables is turned into null. The same happends with the request attributes. Only Params remains.
Any Ideas???
Java Code:@PostConstruct private void init() { request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); HttpSession sesion = request.getSession(); Entidad ent = (Entidad) sesion.getAttribute("usuario"); }
Similar Threads
-
Lost session in Weblogic
By toofast in forum Advanced JavaReplies: 9Last Post: 08-21-2014, 06:24 PM -
Java program that uses MySQL (creating user & database without user interaction)
By Ravendark in forum JDBCReplies: 7Last Post: 05-19-2014, 04:57 PM -
User interaction command-line
By kkid in forum New To JavaReplies: 8Last Post: 10-29-2012, 02:37 PM -
Developing an app without user interaction
By StateMachine in forum AndroidReplies: 0Last Post: 12-31-2011, 08:30 AM -
How do I create session for a user when S/he login and expire the session.
By dpk_vash in forum Web FrameworksReplies: 2Last Post: 12-23-2008, 07:35 PM
Bookmarks