<?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";'
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.
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.
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With