Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

response.sendRedirect problem

 
Greenhorn
Posts: 2
  • 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

 
Sheriff
Posts: 67389
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Ranch Hand
Posts: 232
  • 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?
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic