DOCTYPE error

I am finding that IDEA flags an error in my DOCTYPE statement in some files but not in others. For example, following is the DOCTYPE statement for my web.xml which is not flagged

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

However, a similar DOCTYPE statement in my struts-config.xml

<!DOCTYPE struts-config
PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

has the URI in red. The tool-tip message is "URI is not registered (IDE Options|Resources).

I realize that I can fix this problem by getting a local copy of the dtd and setting up the resources as suggested. However, the fact that my web.xml works fine suggests that I should not have to go through this process.

Any ideas?

Sri

P.S.
The URI is valid

1 comment

See below.

"Srivaths Sankaran" <sri.sankaran@sas.com> wrote in message
news:4983467.1043244922676.JavaMail.jrun@is.intellij.net...

I am finding that IDEA flags an error in my DOCTYPE statement in some

files but not in others. For example, following is the DOCTYPE statement
for my web.xml which is not flagged
>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

>

However, a similar DOCTYPE statement in my struts-config.xml

>

<!DOCTYPE struts-config
PUBLIC "-//Apache Software Foundation//DTD Struts Configuration

1.1//EN"

"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

>

has the URI in red. The tool-tip message is "URI is not registered (IDE

Options|Resources).
>

I realize that I can fix this problem by getting a local
copy of the dtd and setting up the resources as suggested.
However, the fact that my web.xml works fine suggests that
I should not have to go through this process.

>

Any ideas?


IDEA recognizes a few DOCTYPEs by default. This is why the web app DOCTYPE
is recognized, but struts-config isn't. This is a good thing, btw...since
IDEA allows you to set up web app integration, it only makes sense that it
should also auto-recognize web app DOCTYPEs.

chris


0

Please sign in to leave a comment.