Hi folks,

I have recently started to use a tomcat-3.2.1 instead of the
old tomcat-3.1 version  and  encountered a strange configuration problem.

Currently I have mapped the old tomcat version 3.1  to the port 8080 and
new one (3.2.1) to  8088. Both use the same  /conf/web.xml file (with no 
differences):

[immo@jimbo immo]$ diff jakarta-tomcat/conf/web.xml  
jakarta-tomcat-3.2.1/conf/web.xml
[immo@jimbo immo]$    

which also includes the appropriate  MIME-mapping for wap/wml-MIME type:
....
<mime-mapping>
       <extension>
           wml
       </extension>
       <mime-type>
           text/vnd.wap.wml
       </mime-type>
   </mime-mapping>
....  

I also imagine that both server.xml configuration files are properly 
configured (?), TOMCAT_HOME
is set. etc....         

I have the same  application (or the context) on both versions ,
this is under the 3.2.1.-version:

[immo@jimbo immo]$  ls jakarta-tomcat-3.2.1/webapps/spll/*
jakarta-tomcat-3.2.1/webapps/spll/WEB-INF:
classes  lib  web.xml  web.xml~

jakarta-tomcat-3.2.1/webapps/spll/wml:
SPLLregister.wml  start.wml  start.wml~  

and exactly the same structure under tomcat-3.1 folders:

[immo@jimbo immo]$ ls jakarta-tomcat/webapps/spll/*
jakarta-tomcat/webapps/spll/WEB-INF:
classes  lib  web.xml  web.xml~

jakarta-tomcat/webapps/spll/wml:
SPLLregister.wml  start.wml  start.wml~   

so basically those are identical.

But now the  problem- when accessing
different tomcat versions the HTTP Content-type
headers differ. Here is what is given form the new version (tomcat-3.2.1)
(accessing the port via telnet for a demonstrating purpose):


[immo@jimbo immo]$ telnet localhost 8088
Trying 127.0.0.1...
Connected to jimbo.tte.vtt.fi.
Escape character is '^]'.
GET /spll/wml/start.wml HTTP/1.0

HTTP/1.0 200 OK
Content-Type: text/plain
Content-Length: 1552
Last-Modified: Sat, 16 Dec 2000 10:44:32 GMT
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 
1.3.0beta; Linux 2.2.14-5.0 i386; java.ven
dor=Sun Microsystems Inc.)

<?xml version="1.0"?>

and here is from the old version (Tomcat-3.1):

[immo@jimbo immo]$ telnet localhost 8080
Trying 127.0.0.1...
Connected to jimbo.tte.vtt.fi.
Escape character is '^]'.
GET /spll/wml/start.wml HTTP/1.0

HTTP/1.0 200 OK
Date: Wed, 20 Dec 2000 08:17:42 GMT
Status: 200
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 
1.3.0beta; Linux 2.2.14-5.0 i386; java.vendo
r=Sun Microsystems Inc.)
Content-Type: text/vnd.wap.wml
Last-Modified: Sat, 16 Dec 2000 10:44:32 GMT
Content-Length: 1552
Content-Language: en

<?xml version="1.0"?>`

Note the difference : text/plain versus text/vnd.wap.wml !  Now the
question is , what I'm doing wrong or what/how should I configure
Tomcat 3.2.1 that the  /conf/web.xml  - file will also be valid for the 
newversion
(so that I will get a text/vnd.wap.wml - header  from.wml files ) ??
Now it doesn't seem to have any effects with Tomcat 3.2.1.

Servlets are working similar way on both configurations, but these static
wml-files are the problem.

Any help is appreciated !

Regards,

Immo




Reply via email to