• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why does browser asks to resend data when response page is reloaded ?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing an application using struts2. I am facing a problem in the login part. When a login is performed,it will redirect to the index.jsp page.Now the problem arises. The problem is when after loggin in, index.jsp is reloaded, browser asks me resend data. I dont know why it is happening? here is my struts.xml code for authenticate action:-



and here is code for the login action class:-




also when index.jsp comes, the url area of browser remains unchanged, the link in url field of browser still shows the action name like:- localhost:8084/Tek-Hub/authenticate/
Plzzz help .
 
Saloon Keeper
Posts: 15484
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have experience with Struts, but it sounds like you're performing a forward and not a redirect. After authentication (which should be a POST request), the action should redirect to the index.jsp using a GET request.

You need to tell Struts to redirect, not forward.
 
reply
    Bookmark Topic Watch Topic
  • New Topic