struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Preetham Mallavarapu <preethamreddy.mallaar...@gmail.com>
Subject Re: Need help in fixing issue with Url refresh
Date Tue, 09 Jun 2015 14:27:09 GMT
Hi Christoph,

I have tried working in the way login-post-request (using
redirectAction)..It successfully redirects to the required page but its not
displaying the data in that..

ex:

In jsP I have <s:text name="firstName"/>

when I do without redirect it displays user first name but when I try using
redirectAction it shows *"firstName" instead of data..*

I am not sure whether I have followed the correct process or not..

could you kindly provide me an example where I can refer ..?

Thanks,
Hari Krishna



On Mon, Jun 8, 2015 at 7:42 PM, Preetham Mallavarapu <
preethamreddy.mallaarapu@gmail.com> wrote:

> Thanks Christoph for the suggestion. I will give a try now.
>
> Thanks,
> Hari Krishna
>
>
> On Mon, Jun 8, 2015 at 4:25 PM, Christoph Nenning <
> Christoph.Nenning@lex-com.net> wrote:
>
>> > 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