• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

getRequestDispatcher problem  RSS feed

 
Greenhorn
Posts: 11
Eclipse IDE Java
  • 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..
 
Ranch Hand
Posts: 1512
  • Likes 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for reply Bosun..

Will try it....
 
Ranch Hand
Posts: 70
  • 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
  • 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..
 
Marshal
Posts: 67241
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A redirect most certainly does not end a session.
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Likes 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for giving me your precious time...
 
Let nothing stop you! Not even this tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!