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

response.sendRedirect problem

 
Atishay Kumar
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea about the lower-casing, but the %20's are the correct URL encoding for space characters.
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic