tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Bookey" <ben.boo...@gistec-online.de>
Subject AW: Setting JVM ==> file.encoding = Cp1252
Date Wed, 08 Sep 2004 16:22:46 GMT

Dear Allistair, (et.al)

Many many many thanks for ALL your help. The problem has "disapeared"! "oh
joy, oh rapture unforseen"

The problem seemed to disapear when I inserted a filter-mapping where
servlets are mapped, for the incoming request filter which converts all
request objects to utf-8 for the application, which was missing from my
web.xml. Then I set the various page-encoding , etc. (see below)

//////////////////////////////////////////v/////////////////////////////////
/////////v//////////////////////////////////////////v
<%@ page language="java"%>
<%@ page contentType="text/html;UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<html>
<head>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
     <title>encoding data test.</title>
</head>

<body  bgcolor="#F3F3F3">
<br><br><br>
<%
String reqURL = "/InGeoWebEntryTool/servlet/EncodingValidationServlet";
String strEncodeTest="";

if (request.getParameter("text")!=null &&
!request.getParameter("text").equalsIgnoreCase("")){
    strEncodeTest = request.getParameter("text");
}
%>
<FORM action="<%=reqURL%>" accept-charset='UTF-8' method="post">
 <input  type="text" name="encodeTest" value="<%=strEncodeTest%>" size="98">
 <input type="submit" value="post to server" style="WIDTH: 120px">
</FORM>
</body>
</html>

//////////////////////////////////////////v/////////////////////////////////
/////////v//////////////////////////////////////////v

Now i have this working using utf-8.  I am sure this will now work for all
encodings, but I think we shall stick with utf-8.


regards,

Ben



-----Ursprüngliche Nachricht-----
Von: Allistair Crossley [mailto:Allistair.Crossley@QAS.com]
Gesendet: Mittwoch, 8. September 2004 12:41
An: tomcat-user@jakarta.apache.org; ben.bookey@gistec-online.de
Betreff: RE: Setting JVM ==> file.encoding = Cp1252


hi ben,

the jvm always operates with utf. Data transferred into or out of the jvm
is in a format matching the file.encoding property.

i don't understand why you wish to change the file.encoding. the jvm file
encoding should really match your file system, that's why on windows it is
Cp1252 and on linux iso-8859-15.

the file.encoding will not affect the way your request encoding or database
encoding aligns.

why don't you email me your web.xml, your jsp, your servlet, your JNDI or
database connectivity config and I will take a look.

ADC

> -----Original Message-----
> From: Ben Bookey [mailto:ben.bookey@gistec-online.de]
> Sent: 08 September 2004 11:12
> To: Allistair Crossley
> Subject: AW: Setting JVM ==> file.encoding = Cp1252
>
>
> Me yet again..
> would it be a good idea to convert all my app config files to
> utf8 too, once
> I change this file.enoding setting?
>
> regards
> Ben
>
> -----Ursprüngliche Nachricht-----
> Von: Allistair Crossley [mailto:Allistair.Crossley@QAS.com]
> Gesendet: Mittwoch, 8. September 2004 11:46
> An: Tomcat Users List; ben.bookey@gistec-online.de
> Betreff: RE: Setting JVM ==> file.encoding = Cp1252
>
>
> Ben,
>
> file.encoding is a JVM parameter specified e.g
>
> java -Dfile.encoding=Cp1252 SomeClass
>
> There is no need to set this in server.xml when you can do this in the
> startup scripts for TC. You could even try within Java code
>
> System.setProperty("file.encoding", "Cp1252");
>
> ADC
>
> > -----Original Message-----
> > From: Ben Bookey [mailto:ben.bookey@gistec-online.de]
> > Sent: 08 September 2004 10:44
> > To: Tomcat User List
> > Subject: Setting JVM ==> file.encoding = Cp1252
> >
> >
> > Dear list,
> >
> > I am new to Java and to TC. When I write all the java.system
> > properties
> > to the logfile on my windows machine, I see I am using
> >
> > file.encoding = Cp1252
> >
> > on my linux machine this is
> >
> > file.encoding = iso-8859-15
> >
> >
> > I know I can configure this jvm paramter in the
> > catalina.bat/sh file, but
> > is there a way of doing this inside the server.xml or something ?
> >
> > regards,
> >
> > Ben
> >
> >
> >
> +-------------------------------------------------------------------+
> > | GIStec GmbH - Ihr Partner für GIS - Technologie
>         |
> > |
>         |
> > | Ben Bookey
>         |
> > | Ben.Bookey@gistec-online.de           Fraunhoferstraße 5
>         |
> > | Tel         0 61 51 / 155 - 254       D-64283 Darmstadt
>         |
> > | Fax         0 61 51 / 155 - 259
http://www.gistec-online.de |
> |                                                                   |
> | http://www.ingeoic.de              http://www.geo-watermarking.de |
> +-------------------------------------------------------------------+
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
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