File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes '%' Character on the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark " Watch " New topic
Author

'%' Character on the URL

Mohammad Jaber
Ranch Hand

Joined: Apr 10, 2006
Posts: 46
hi ,
how can i send a parameter equals to '%' through the URL , '%' considered as a white space on the browser , is there a way to escape it or to change the browsers behavior .. thanks in advance


OCP , SCJP 5.0
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
use %25 inplace of just %

Eric
Mohammad Jaber
Ranch Hand

Joined: Apr 10, 2006
Posts: 46
Thanks it works fine ...
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

This may be out of subject considering we're in a Javascript forum, but you can encode the url's parameters using JSTL's <c aram> tag. This will ensure that all special characters will be encoded properly.


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61415
    
  67

Use the Javascript encodeURI() method to easily encode a URL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: '%' Character on the URL