• 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

Problem using RequestDispatcher

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm Logging in by username="Teja" and password ="Teja123" and when i click on login, LoginServlet gets executed.
LoginServlet is dispatching the request to home.jsp. So, in home.jsp when i click on 'profile' ProfileServlet gets executed.  From profile if I wanted to go back to previous page  i'm getting a page saying "RESUBMIT THE FORM ? ".
If i'm using response.sendRedirect("home.jsp") in LoginServlet there is no "RESUBMIT THE FORM ? " page but goes back to home.jsp page

login.html


LoginServlet


home.jsp



LogoutServlet



ProfileServlet



link.html


link2.html
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this article and pay special attention to the "PRG" pattern.
reply
    Bookmark Topic Watch Topic
  • New Topic