struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <Christoph.Nenn...@lex-com.net>
Subject Re: Need help in fixing issue with Url refresh
Date Mon, 08 Jun 2015 10:55:09 GMT
> From: Preetham Mallavarapu <preethamreddy.mallaarapu@gmail.com>
> To: Struts Users Mailing List <user@struts.apache.org>, 
> Date: 08.06.2015 11:00
> Subject: Need help in fixing issue with Url refresh
> 
> Hi,
> 
> I have a problem in my struts2 app when I try to refresh url
> 
> Below is the url I am trying to refresh..
> 
> when user logs in then the *checkUser* method will be called in the
> LoginManager class and if it is a successfull login the home page will 
be
> called having the below one as the url..
> 
> http://localhost:8081/NewApp/checkUserLoginManager
> 
> 
> Now the problem is when I try to refresh the url it throws me null 
pointer
> exception..for me it looks like it is calling again the checkUser 
method..
> 
> Now can someone help me on how to fix this?
> 
> Thanks,
> Hari Krishna


hi,

this sounds like you don't use a redirect but answer the 
login-post-request with html. When an user hits browser refresh the post 
request ist submitted again but the action misses some data at this time. 
I suggest to use a redirect after login to show the user start page.


http://struts.apache.org/docs/redirect-action-result.html


regards,
Christoph


This Email was scanned by Sophos Anti Virus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message