DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   url case sensitive (http://www.daniweb.com/forums/thread201119.html)

sharao Jul 2nd, 2009 1:49 am
url case sensitive
 
hi frnds

http://localhost/project

using the above url iam running my project

how to run when i type my project in uppercase

like this url http://localhost/PROJECT

JamesCherrill Jul 2nd, 2009 4:48 am
Re: url case sensitive
 
URLs are case-sensitive, so do you want to change http://localhost/PROJECT into http://localhost/project ?
If so, the toLowerCase method in the String class will do it:
"http://localhost/PROJECT".toLowerCase();

sharao Jul 2nd, 2009 7:33 am
Re: url case sensitive
 
Quote:

Originally Posted by JamesCherrill (Post 906124)
"http://localhost/PROJECT".toLowerCase();

thnx for response

where can i place the above code ( i want to run for both cases)

JamesCherrill Jul 2nd, 2009 7:36 am
Re: url case sensitive
 
That depends on your program! But I guess there's somewhere you have a String variable that you set from the user input, so you can use the toLowerCase on that immediately after reading it in, but before doing anything else with it.

sharao Jul 3rd, 2009 2:25 am
Re: url case sensitive
 
hi iam providing project path in the xml file (configuration file)
how to do it in that...


All times are GMT -4. The time now is 4:28 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC