Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Wrong charset (is UTF-8 should be ISO 8859-1)

Wrong charset (is UTF-8 should be ISO 8859-1)

2007-01-04       - By Sk?ldheimer Fredrik

 Back
Reply:     1     2  

Hello.

I'm a tomcat beginner but have experience of the apache http server.

I have a character issue I can't figure out. Here are a simple example of a
html-page.

- 8< -- --
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3
.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv" lang="sv">
       <head>
           <title>min titel</title>
           <meta name="Title" content="min sida" />            
           <meta http-equiv="Content-type" content="text/html; charset=ISO
-8859-1" />
           <meta http-equiv="Content-Script-Type" content="text/javascript" />
           <meta http-equiv="Content-Style-Type" content="text/css" />
           <meta http-equiv="content-language" content="sv" />
           <meta name="robots" content="Index, follow" />
           <meta name="Description" content="[B@(protected)" />
           <meta name="Keywords" content="mina keywords" />
           <link rel="schema.DC" href="http://purl.org/DC/elements/1.0/" />
           <meta name="DC.Format" scheme="IMT" content="text/html" />
           <meta name="DC.Type" content="text" />
           <meta name="DC.Title" content="titel" />
           <meta name="DC.Description" content="[B@(protected)" />
           <meta name="DC.Subject" content="" />
           <meta name="DC.Creator" content="Jag" />
           <meta name="Date" scheme="W3CDTF" content="2006-12-15" />
           <meta name="DC.Date" scheme="W3CDTF" content="2006-12-15" />
           <meta name="DC.Date.Modified" scheme="W3CDTF" content="2006-12-15"
/>
           <meta name="DC.Date.Created" scheme="W3CDTF" content="2006-11-27" />
           <meta name="DC.Language" scheme="RFC1766" content="sv" />
           <meta name="DC.Identifier" scheme="URL" content="www.minurl.se" />
           <meta name="DC.Publisher" content="min content" />
           <meta name="DC.Rights" content="comyright till mig" />
           <meta name="DC.Organisation" content="organisation" />
       </head>
   <body>
 test
   </body>
</html>
-- ---- ----

Now, When I view the page with explorer/firefox/opera it still think the
characterset should be UTF-8 (See http://UTF-8.ora-code.com). I have looked in the config files of tomcat but
can't find any parameters that corresponds to the "defaultcharacterset" that I
'm used to from apache http server httpd.conf file. Is there such a parameter in
tomcat? If not, why does the webbrowser think the page is in UTF8 when running
the page on tomcat but ISO 8859-1 when running it on a apache http server?


 

Fredrik Sk?ldheimer
IT-konsult

Telefon:
V?xel:
Direkt:
E-post:

+46 36 32 65 64
+46 36 32 40 00
265 64
fredrik.skoldheimer@(protected)

IT-centrum
Box 1024
551 11 J?nk?ping














©2008 junlu.com - Jax Systems, LLC, U.S.A.