Local DTD for web.xml [message #71445] |
Thu, 03 February 2005 15:30  |
Eclipse User |
|
|
|
Originally posted by: jrduncans.stephenduncanjr.com
To support disconnected development, for my project I've made a dtd
folder inside of my web-inf directory and placed the web-app_2_3.dtd
file inside this folder. Then I change the uri for the dtd on the
web.xml file from http://java.sun.com/dtd/web-app_2_3.dtd to
dtd/web-app_2_3.dtd. The web.xml file doesn't show any validation
errors when I validate it, but the project will show as an error, and
the "Deployment Descriptor" piece of the J2EE project view goes away
when using the local dtd. Any ideas?
Here's the error messages that seem to go along with saving the change
to using the local dtd:
!ENTRY org.eclipse.wst.validation 4 0 2005-02-03 15:28:30.105
!MESSAGE
*** ERROR ***: Thu Feb 03 15:28:30 EST 2005
org.eclipse.wst.validation.core.ValidationException: CHKJ3000E: WAR
Validation Failed:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.De ploymentDescriptorLoadException:
WEB-INF/web.xml
!ENTRY org.eclipse.wst.validation 4 0 2005-02-03 15:28:30.155
!MESSAGE
*** ERROR ***: Thu Feb 03 15:28:30 EST 2005
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.De ploymentDescriptorLoadException:
WEB-INF/web.xml
|
|
|
|
|
|
Re: Local DTD for web.xml [message #72013 is a reply to message #71917] |
Sun, 06 February 2005 16:25  |
Eclipse User |
|
|
|
Originally posted by: jrduncans.stephenduncanjr.com
Lawrence Mandel wrote:
> Hi Stephen,
>
> BEA has some documentation on this that states,
>
> "...you must still include this <!DOCTYPE...> element in your web.xml
> file, and have it reference the external URL because the version of the
> DTD contained in this element is used to identify the version of this
> deployment descriptor."
>
> (See
> http://e-docs.bea.com/wls/docs61/webapp/webappdeployment.htm l#1006167.)
>
> This means that to do local disconnected (no net access) development, your
> deployment descriptor must still contatin a doctype declaration that
> references the DTD at sun.com. You can then add the DTD to the XML catalog
> to prevent Eclipse from going to sun.com to retrieve the DTD. Your doctype
> declaration should look like
>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.// DTD WebApplication
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
>
> In regards to validation, the web.xml file will validate correctly
> (according to the XML validator) as it is still a valid XML document. The
> problem is it is not recognized as the deployment descriptor for your
> project.
>
>
> Lawrence
Thanks. That clears it up.
-Stephen
|
|
|
Powered by
FUDForum. Page generated in 0.08820 seconds