Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where i can find valid values for the version attribute of the web-app element in web.xml?

Typical web.xml looks like this:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<web-app version="2.4">
  <display-name>Archetype Created Web Application</display-name>
</web-app>

How can I find out which values are valid for the version attribute of <web-app>?

<web-app version="?">

Is it 2.5 or may be 3.0?

Does someone know a URL with the schema or DTD for web.xml validation? URL's for DTD of different web-app versions are different is there some source where I can see full list?

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

//doctype for servlet 2.2
<!DOCTYPE web-app PUBLIC
  "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
like image 654
Cherry Avatar asked Mar 11 '13 09:03

Cherry


People also ask

What does WEB xml file contains and what are the tags used in the web xml file?

web. xml defines mappings between URL paths and the servlets that handle requests with those paths. The web server uses this configuration to identify the servlet to handle a given request and call the class method that corresponds to the request method. For example: the doGet() method for HTTP GET requests.

Which of the following elements are mandatory under the web-app element of a deployment descriptor?

The elements of deployment descriptor are case insensitive. The servlet-mapping element, if defined, must be included within the servlet element. The web-app element must include the servlet element.

What is web-app in xml?

xml contains a top-level web-app element. It is the Servlet standard location for defining things like servlet mappings and security roles. WEB-INF/resin-web. xml is also used by Resin and will override and supplement the configuration in WEB-INF/web.


1 Answers

You can try this url:

http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html

Here you can find

http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_3_0.xsd

http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_2_5.xsd

like image 105
Gabriele Mariotti Avatar answered Sep 28 '22 01:09

Gabriele Mariotti