RSS Forums RSS
Please support our JSP advertiser: Lunarpages JSP Web Hosting

pass variable with space

Join Date: Jun 2006
Location: India
Posts: 7,176
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 26
Solved Threads: 396
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: pass variable with space

  #4  
Jan 13th, 2008
You have been given your answer.

A URI can't contain any spaces and some other special characters, and if they do, they need to be encoded. With the way you are currently doing things, when the country name with spaces is encountered, the URI becomes report.jsp?address=some address when it should have been report.jsp?address=some%20address .

Using scriptlets in your JSP file is a bad practice not to mention that accessing a database from the JSP file is disastrous.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:13 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC