It's not a secret anymore!
The moose likes Servlets and the fly likes web.xml header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "web.xml header" Watch "web.xml header" New topic

web.xml header

Ken Duncan
Ranch Hand

Joined: Apr 30, 2007
Posts: 49

I am working on a web application to learn Spring. In viewing what I'm supposed to see in the web.xml file, it looks different than I think it should be:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"
xsi:schemaLocation="" >

A proper web.xml file should start this way I believe:
<web-app version="2.4"

Neither of these match what IDEA 9.0.2 built for me:
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"" >


These three things cannot all be right, so how do I know which one is correct? Thanks.


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63227

Your first two differ only by the optional XML header.

The 3rd variant is for Servlets 2.3.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: web.xml header
It's not a secret anymore!