Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Kathy & Bert please help...

 
Mukhtar Ahmed
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Tomcat should I use for testing Servlet 2.4 and JSP 2.0 code?
On tomcat site, it say 5.0.18 it implements 2.4 but it used 2.3 dtd?
Even in the servlet 2.4 spec, they haven't given 2.4 dtd. They still have old 2.3 dtd and while they have introduced new tags in web.xml in the specification.
So what do I do?
 
Ivan Matmati
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
ok i'm not the person you expected but let me tell you that Tomcat 5.0 fits for working with 2.4 servlet and 2.0 jsp (maybe a few bugs!).
In the specification 2.4 servlet, you won't find a dtd for 2.4 but instead a xsd at SRV 13.4 .
Good work!!
 
Mukhtar Ahmed
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ivan. Can you tell me how do I use the reference of the XSD in web.xml? The web.xml in tomcat examples uses reference to 2.3 dtd:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an interesting question! I'm using 5.0.14 but I'll ask our co-author Bryan, he's the real Tomcat expert in the group.
 
Bryan Basham
author
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Tomcat v5.x will work with both servlet v2.3 webapps and v2.4
webapps. So, yes, you can use a web.xml file that uses the DOCTYPE
declaration you mentioned.
For a v2.4 webapp, you should use the following prelude on your web.xml
file:

Cheers,
Bryan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic