This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSF and the fly likes different headers JSF 1.1 and JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "different headers JSF 1.1 and JSF 2.0" Watch "different headers JSF 1.1 and JSF 2.0" New topic

different headers JSF 1.1 and JSF 2.0

Christin Vogt

Joined: Nov 16, 2010
Posts: 1
hello together,

i work with jsf since 4 weeks. i started with JSF 1.1 and now i want to migrate my project to JSF 2.0.
i know that i have to change the header

header JSF 2.o:
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi=""

header JSF 1.1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">
<web-app id="WebApp_ID">

can someone explain me the different headers? i want to understand why i have to change them.

thank you!

greetz from germany
Ilari Moilanen
Ranch Hand

Joined: Apr 15, 2008
Posts: 199
Welcome to JavaRanch

The main reason is that you move to using a new Java Servlet Specification. Old was 2.3 and the new is 2.5.

More background info for example from here

And you can naturally find the specifications from Oracle web site.

EDIT: Oh, and if you were wondering why the old was defined with dtd and the new one with xsd please read these
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17257

It isn't a header, it's a schema reference. The schema reference points to a schema definition so that XML processors can automatically validate the XML.

The big difference here is that you're moving from a DTD to an XML schema (sometimes known as "xsd"). DTD's are the older of the 2 schema definition types and they are more limited, so newer specs use xsd's instead.

Whether you use a DTD or a schema, you do need to use the version that matches the XML content you're defining. Otherwise the XML parser will completely reject your XML without passing it on to the code that actually employs the XML.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: different headers JSF 1.1 and JSF 2.0
It's not a secret anymore!