Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7799863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:26:36+00:00 2026-06-02T00:26:36+00:00

Does the web-app_*.dtd reference web.xml determine the Servlet and JSP version used in the

  • 0

Does the “web-app_*.dtd” reference web.xml determine the Servlet and JSP version used in the web application ?

Somehow I have been under that impression, but it seems like I am wrong. I have an application where the web.xml specifies

<!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

I was thinking that it should be using Servlet version 2.3. However, when I put the following code in my JSP, I get a totally different version.

<div>
Server info: <%= application.getServerInfo() %><br>  
Servlet version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %>  
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br> 
</div>

Output:

Server info: Apache Tomcat/7.0.21
Servlet version: 3.0
JSP version: 2.1

I will appreciate help with a few related questions:.

  • Does the dtd version have any bearing on the Servlet and JSP version used in the application ?
  • Is my application using Servlet version 3.0 because that is the default version being used by Apache Tomcat 7 ?
  • Is there any way to make Tomcat 7, use an older Servlet JSP version ?
  • One of the comments (by Bauke Scholtz) on this page, seems to suggest that every Servlet version is tied to a JSP version. Is this always true ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:26:37+00:00Added an answer on June 2, 2026 at 12:26 am

    Does the dtd version have any bearing on the Servlet and JSP version used in the application ?

    Yes, that is the one which tells the server in which version the application was developed.

    Is my application using Servlet version 3.0 because that is the default version being used by Apache Tomcat 7 ?

    No, the server can support 3.0 does not mean your application uses 3.0 Because your application is servlet 2.5, the servlet 3.0 features will be disbled for you.

    Is there any way to make Tomcat 7, use an older Servlet JSP version ?

    Yes. The answer to the first question, your web.xml

    One of the comments (by Bauke Scholtz) on this page, seems to suggest that every Servlet version is tied to a JSP version. Is this always true ?

    Mostly Yes. It is not tightly coupled. But every server complies to JavaEE standard, and each JavaEE standard should confirm to some specifications and their versions. For Ex, JavaEE 5 need Servlet 2.5 and JSP 2.1, JavaEE 6 needs Servlet 3.0 and JSP2.2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know about CKEditor, I have integrated this application in my web app.
I have code that does a web-service request. While doing this request I need
Does anybody know what google web master tools offer I have google analytics on
Does anyone knows a web application security scanner for mac and easy to install?
Does anyone have code for a Web Service with works with the Quickbooks Web
I am using struts2 for developing a web application. I have include the required
In a web application's web.xml file, one can define initial parameters for servlets and
I am working on a web app using C# and asp.net I have been
I have an HTML web-app which runs in a viewport. The web-app does not
I have an MVC3 web app that does auth to a customization of StarterSTS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.