HOW TO

Return results from a Java Search Template in a non-English environment

Last Published: April 26, 2020

Summary

The following article describes how to allow a Java Search Template to return search results correctly in non-English environments by editing three files: ResTemplates.properties, search.jsp and web.xml.

Procedure

  • ArcGIS Server 9.1
  1. Edit the charset in search.jsp at /ArcGIS/developerkit/Templates/Java/Search with proper charset. The default is "ISO-8859-1", which is an English charset.
For the lists of charset, see the link for Supported Encodings URL in the Related Information section below. The Japanese example is shown below. The Japanese charset is "Shift_JIS".
 
Original:
<%@ page contentType="text/html; charset=ISO-8859-1" %>

Modified:
<%@ page contentType="text/html; charset=Shift_JIS" %>
  1. Edit the filter in web.xml at /ArcGIS/developerkit/Templates/Java/WEB-INF.
Original:
<filter>
  <filter-name>SessionTimeout</filter-name>
  <filter-class>com.esri.arcgis.webcontrols.util.ADFSessionTimeoutFilter</filter-class>
  <init-param>
    <param-name>redirectPage</param-name>
    <param-value>/timeout.html</param-value>
  </init-param>
</filter>

Modified:
<filter>
  <filter-name>SessionTimeout</filter-name>
  <filter-class>com.esri.arcgis.webcontrols.util.ADFSessionTimeoutFilter</filter-class>
  <init-param>
    <param-name>characterEncoding</param-name>
    <param-value>Shift_JIS</param-value>
  </init-param>
  <init-param>
    <param-name>redirectPage</param-name>
    <param-value>/timeout.html</param-value>
  </init-param>
</filter>
 
  • ArcGIS Server 9.0 and 9.0.1
  1. Change the Label value of "Go" and "Map" to another string value in ResTemplates.properties at /ArcGIS/developerkit/Templates/Java/WEB-INF/classes/res.
For example: Search.Go=Search
Search.MapButton=ViewMap
  1. Edit the charset in search.jsp at /ArcGIS/developerkit/Templates/Java/Search with proper charset. The default is "ISO-8859-1", which is the English charset.
For the lists of charset, see the link for Supported Encodings URL in the Related Information section below. The Japanese example is shown below. The Japanese charset is "Shift_JIS".
 
Original:
<%@ page contentType="text/html; charset=ISO-8859-1" %>

Modified:
<%@ page contentType="text/html; charset=Shift_JIS" %>
  1. Edit the filter in web.xml at /ArcGIS/developerkit/Templates/Java/WEB-INF.
Original:
<filter>
  <filter-name>SessionTimeout</filter-name>
  <filter-class>com.esri.arcgis.webcontrols.util.ADFSessionTimeoutFilter</filter-class>
  <init-param>
    <param-name>redirectPage</param-name>
    <param-value>/timeout.html</param-value>
  </init-param>
</filter>

Modified:
<filter>
  <filter-name>SessionTimeout</filter-name>
  <filter-class>com.esri.arcgis.webcontrols.util.ADFSessionTimeoutFilter</filter-class>
  <init-param>
    <param-name>characterEncoding</param-name>
    <param-value>Shift_JIS</param-value>
  </init-param>
  <init-param>
    <param-name>redirectPage</param-name>
    <param-value>/timeout.html</param-value>
  </init-param>
</filter>

Article ID:000007994

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic