Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this web.xml error mean?

Tags:

schema

web.xml

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

Referenced file contains errors (http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd). For more information, right click on the message in the Problems View and select "Show Details..."

The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml.

In details, I see a bunch of these:

s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than xs:appinfo and xs:documentation. Saw 'var _U="undefined";'

like image 375
jacekn Avatar asked Nov 18 '12 04:11

jacekn


People also ask

How would you specify the default error page in web xml?

This error page is defined in web. xml by using tag <error-page>. <error-page> allows you to define custom error messages based upon HTTP error code or any Java Exception. you can define a default error message for all exceptions by specifying <exception-type> as java.

How do you handle exception thrown by application in web xml?

When a servlet throws an exception, the web container searches the configurations in web. xml that use the exception-type element for a match with the thrown exception type. You would have to use the error-page element in web.

How do I update web xml in Eclipse?

Browse to the webapps\ch11\WEB-INF directory, and click Open. Then in the New File dialog that appears, enter the name of the file to link to, web. xml , and click OK. This adds web.


1 Answers

If you replace j2ee by javaee, it will work fine.

EDIT :

<web-app version="2.5"      xmlns="http://java.sun.com/xml/ns/javaee"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 

Edit:

To know anything further related to this error. Please follow the Link. Here you will find schemas for Java EE deployment descriptors (web.xml).

like image 172
Sazzadur Rahaman Avatar answered Sep 19 '22 03:09

Sazzadur Rahaman