Forums Register Login

response.sendRedirect problem

+Pie Number of slices to send: Send
I am trying to redirect user to a page when a condition is satified

String strUrl="ChangeUserPassword.jsp?strInfo=" + "UserID:"+strUserId+" does not exist";
System.out.println(strUrl);
response.sendRedirect(strUrl);



The url is printing fine on console
==========
ChangeUserPassword.jsp?strInfo=UserID:atisahy does not exist
==========

but when it is redirected all capital letters get changed in lower case. the url the browser get redirected to is.
=========
"http://localhost:8080/INFBKGR3/changeuserpassword.jsp?strinfo=userid:?strInfo=UserID:atisahy%20does%20not%20exist"
==========
why is this happening

+Pie Number of slices to send: Send
I have no idea about the lower-casing, but the %20's are the correct URL encoding for space characters.
+Pie Number of slices to send: Send
which web/app server are you using? I havent seen any server wherein the jsp file names gets changed to lowercase names.
Is this jsp file generated at runtime?
I love a good mentalist. And so does this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1191 times.
Similar Threads
response.SendRedirect and session
SendRedirect
response.sendRedirect(Url)
JSException.
No output from Servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:03:34.