Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Redirection Problem

 
varsha kruthi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am submtting a JSP page using POST method to a servlet.In servlet I am Processing URL that is coming from JSP , my porblem is
If I paste the URL that is coming from JSP(ie taking all the input data user given) on a browser it is correctly redirecting to target page

but If I submits the JSP page, the Same URL is processing in servlet but it is redirecting to Error Page

Please help me.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not confidence on this , because not getting your question correctly ,

But i think , you override doGet() method only, If I am correct, then override the doPost() method and call doGet() method in it, as a first statement.

try this,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35757
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Varsha,
Another way to test the theory is to change your JSP to use GET instead of POST. If it works, you can follow Sagar's steps. If not, the problem is something else and you can post the error message here.
 
Hot dog! An advertiser loves us THIS much:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!