This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 63349
    
  70

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: 63349
    
  70

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.
 
wood burning stoves
 
subject: special charecters in file name while downloading.
 
It's not a secret anymore!