tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Woliński <pwolin...@dfqs.pl>
Subject tomcat5.5 and page encoding in web.xml
Date Fri, 11 Feb 2005 11:05:07 GMT
Hello

I try to set page encoding for *.jsp in web.xml for my context:

---------- web.xml ------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
     version="2.4">

     <jsp-config>
         <jsp-property-group>
             <url-pattern>/*</url-pattern>
             <page-encoding>ISO-8859-2</page-encoding>
         </jsp-property-group>
     </jsp-config>
</web-app>
----------- end web.xml ------------------

It doesn't work.
I also tried with url-pattern: *.jsp

If I put into *.jsp file directive:
<%@ page pageEncoding="ISO-8859-2" %>
national characters looks OK.

That file is included in another jsp file.
I have more files like that and i'd like to set it ones in web.xml.
Previously it works with tomcat4 with no problems.

 From JavaServer Pages Specification Version 2.0:
"It is a translation-time error to name different encodings in the 
pageEncoding attribute of the page directive of a JSP page and in a JSP 
configuration element whose URL pattern matches the page."

I tried to set different encodings in this two places and has no errors.

Any suggestions?
-- 
_____________________________________________________
Piotr Woliński

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message