We help IT Professionals succeed at work.

.wml file on tomcat server (beginner)

hmchee
hmchee asked
on
I would like to use wml+jsp.
How do I configure tomcat to make it serve the .wml, etc.. files?
Thank you.
Comment
Watch Question

Try to find a file named web.xml in your tomcat subfolders.

in that file, you will have to add the following lines:

<mime-mapping>
  <extension>
    wmls
  </extension>
  <mime-type>
    text/vnd.wap.wmlscript
  </mime-type>
</mime-mapping>
<mime-mapping>
  <extension>
    wml
  </extension>
  <mime-type>
    text/vnd.wap.wml
  </mime-type>
</mime-mapping>

That will do for wml and wml script!

It must be the same or similar for jsp!
I think that jsp is already supported.  Just look in the same file if there's a mime-mapping for jsp.

regards
Mark!
 
Sorry for the code presentation, here it goes clearer!

<mime-mapping>
     <extension>
           wmls
     </extension>
     <mime-type>
           text/vnd.wap.wmlscript
     </mime-type>
</mime-mapping>
<mime-mapping>
     <extension>
           wml
     </extension>
     <mime-type>
           text/vnd.wap.wml
     </mime-type>
</mime-mapping>

Mark

Author

Commented:
Hi psycho_cat_69,

I've followed your instructions, but when I loaded the .wml file in UP simulator I got a 'content type error' message. I have included the above text in web.xml just before the welcome files configuration part.
Can you supply me with your WEB.XML file and tell me wich simulator version you're using!

Also, the firewall can be a problem if you are behind one!

waiting for your answer!

best regards!

Mark