Unable to read application xml files packaged within the war file
 Technote (FAQ)
 
Problem
If you package xml files within a war file to be used by an application, and if you have problems reading these files when you run the application, it is possible this is an encoding problem.
 
Cause
If you use an InputStreamReader to read the xml files, but do not specify the character encoding when the reader was created within the application, the reader defaults to the operating system EBCDIC character encoding. As a result, you cannot read the files because they are encoded in UTF-8 format.
 
Solution
You can resolve the problem in one of the following ways:
  1. Specify the character encoding as UTF-8 when creating the InputStreamReader because the xml files within the ear file are packaged as UTF-8.

    or

  2. Use a different object reader within the application code that defaults to UTF-8 when reading the xml files.

    or

  3. Convert the xml files to EBCDIC, and package them within the ear file before deploying them to WebSphere Application Server using the System Management End User Interface (SMEUI).



    When porting applications from the distributed platform to z/OS, be aware that the default code page for z/OS is different from the distributed platform (code page 1047 versus UTF-8). You might need to modify applications ported from the distributed platform to z/OS that use streams and readers/writers to explicitly specify the UTF-8 code page.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server for z/OS Deploy (for example: AAT or ANT or EAR/WAR/JAR)
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server for z/OS > Servlet Engine/Web Container
Operating system(s): z/OS
Software version: 4.0.1
Software edition:
Reference #: 1107367
IBM Group: Software Group
Modified date: Mar 27, 2006