File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getRequestDispatcher problem

 
Rocky Khan
Greenhorn
Posts: 11
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to jsp-servlet and Ranch too.
When i submit jsp page it sends info to servlet and servlet process that data and send response as home page..
but at the home page address URL it shows the parameters passed to servlet and their values..
like this

Is there is any way to conver this URL in the following form..


Here is some part of servlet code



There is some terms like URL rewriting, will it help me?..

Please Help..
Thanks in advance..
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope I understand you correctly - You do not want your request parameters to show int he URL. If so, then implement doPost instead of doGet.
 
Rocky Khan
Greenhorn
Posts: 11
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for reply Bosun..

Will try it....
 
abani patra
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think you should use response object's send Redirect method to do that so that url will be show what it is in actual.
 
Rocky Khan
Greenhorn
Posts: 11
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey abani,

I want to retain my session and as per my information using sendRedirect in response ends the session..

Thank you for reply..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64180
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A redirect most certainly does not end a session.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With a redirect you will not be able to access the data from the first request, the session still fine.

Try something like
 
Rocky Khan
Greenhorn
Posts: 11
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for giving me your precious time...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic