| Author |
getRequestDispatcher problem
|
Rocky Khan
Greenhorn
Joined: Oct 18, 2011
Posts: 11
|
|
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
Joined: Nov 06, 2000
Posts: 1506
|
|
|
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.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
Rocky Khan
Greenhorn
Joined: Oct 18, 2011
Posts: 11
|
|
Thank you for reply Bosun..
Will try it....
|
 |
abani patra
Ranch Hand
Joined: Oct 11, 2011
Posts: 70
|
|
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
Joined: Oct 18, 2011
Posts: 11
|
|
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
Joined: Jan 10, 2002
Posts: 56528
|
|
|
A redirect most certainly does not end a session.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Hebert Coelho
Ranch Hand
Joined: Jul 14, 2010
Posts: 754
|
|
With a redirect you will not be able to access the data from the first request, the session still fine.
Try something like
|
[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
|
 |
Rocky Khan
Greenhorn
Joined: Oct 18, 2011
Posts: 11
|
|
|
Thank you all for giving me your precious time...
|
 |
 |
|
|
subject: getRequestDispatcher problem
|
|
|