Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why doesn't RequestDispatcher forward?  RSS feed

 
Greenhorn
Posts: 25
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.I am a beginer and I have a problem with RequestDispatcher.I have a jsp page and a servlet obviousli.I want to submit from the jsp page to the servlet,then servlet creates a RequestDispatcher and forwards back to the jsp page.I can't seem to figure it out.If i hit the sumbit button then the browser shows me the jsp but in the address bar it shows me the servlet
I sure hope somebody can help me...
 
Author and ninkuma
Marshal
Posts: 66678
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the way a forward works. The browser addressed the servlet -- that's all that it knows. The fact that it forwarded to a JSP on the server to format the response is not known to the browser.

Why is this an issue? Who cares what's in the address bar? You shouldn't.
 
It will give me the powers of the gods. Not bad for a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!