*
The moose likes JSP and the fly likes special charecters in file name while downloading. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "special charecters in file name while downloading." Watch "special charecters in file name while downloading." New topic
Author

special charecters in file name while downloading.

Khader mohammed
Greenhorn

Joined: Apr 26, 2007
Posts: 2
Hi,

I have a jsp to download files.I get the "page cant be displayed error" if the file name contains the # charecter.

Can some one please suggest the solution.

Thanks in Advance.

Khader.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

The octothorpe (pound sign) character is a reserved character within a URL (just like ? and &). Be sure that you are URL-encoding your URL components.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Khader mohammed
Greenhorn

Joined: Apr 26, 2007
Posts: 2
Thanks for the reply.
I tried with java.net.URLEncoder.encode() along with using charset as UTF-8.
But now nothing downloads.

Kindly suggest what are steps need to solve this problem.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Originally posted by Khader mohammed:
Kindly suggest what are steps need to solve this problem.


Please read this. Can't say much more without details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: special charecters in file name while downloading.