简体   繁体   中英

Websphere Error 404: java.io.FileNotFoundException

I'm getting

Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /xyz/?????.pdf while hitting url localhost:9080/xyz/液压无极限.pdf . But when I hit localhost:9080/xyz/abc.pdf I got the pdf downloaded.

I am using websphere 8.5.5.

Os - IBM AIX

I have already tried setting

JVM option -Dclient.encoding.override = UTF-8

The issue was not with Websphere but with OS(AIX) on which Webshere is installed. It is because of locale in AIX. By default

locale

LANG=C  
LC_COLLATE="C"  
LC_CTYPE="C"  
LC_MONETARY="C"  
LC_NUMERIC="C"  
LC_TIME="C"  
LC_MESSAGES="C"  
LC_ALL=

The above output indicates that the system locale "C" is currently being used. The 'C' locale is set as "default" locale for applications,which means that their strings are displayed as written in the initial code (without passing through a translation lookup).

To get translation lookup u need to set locale to EN_US.UTF-8(For ref. Click here )

locale

LANG=en_US.UTF-8  
LC_COLLATE=en_US.UTF-8    
LC_CTYPE="en_US.UTF-8"    
LC_MONETARY="en_US.UTF-8"  
LC_NUMERIC="en_US.UTF-8"  
LC_TIME="en_US.UTF-8"        
LC_MESSAGES="en_US.UTF-8"     
LC_ALL=  

I would try setting the WebContainer custom property "DecodeUrlAsUTF8" to true.

For documentation on how to set WebContainer custom properties see: http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/rweb_custom_props.html?cp=SSAW57_8.5.5%2F1-18-6-1196&lang=en

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM