Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Attribute "xmlns:web" in web.xml
Attribute "xmlns:web" in web.xml [message #645972] Tue, 21 December 2010 11:53 Go to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi,

I think there is a bug in the way Eclipse creates a web.xml, but as I am
not sure, I want to ask here before creating a bug report ;-):

A default "web.xml" (here for a JavaEE6 web project) contains an
attribute "xmlns:web=...":

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
...
</web-app>

The sense of the "xmlns:web" attribut should be that you can build this
kind of web.xml:
<?xml version="1.0" encoding="ASCII"?>
<web:web-app
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" ...>
<web:display-name>TestWeb</web:display-name>
....
</web:web-app>

But this will result in validation errors if the autogenerated web.xml
is used.

I think the "xmlns:web" attribute should be:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">

Is this right? Should I file a bug report? Or do I misunderstand
something ;-)?

By the way: this must be quite an old one...

Best regards

Wolfgang
Re: Attribute "xmlns:web" in web.xml [message #646533 is a reply to message #645972] Tue, 28 December 2010 09:20 Go to previous message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
> I think there is a bug in the way Eclipse creates a web.xml, but as I am
> not sure, I want to ask here before creating a bug report ;-):
>...
> Is this right? Should I file a bug report? Or do I misunderstand
> something ;-)?
>

Bug reported:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=333259
Previous Topic: Eclipse freezes deploying to Axis
Next Topic:StringEditorInput implements IStorageEditorInput Input WebPageEditor
Goto Forum:
  


Current Time: Tue Apr 23 16:14:36 GMT 2024

Powered by FUDForum. Page generated in 0.03111 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top