Including DTD Resources

I'd like to set intellij to recognize the tiles DTD (see below) so I can use the auto-complete and suggestion features. I'm pretty sure I need to go to "file" "settings", "resources" and then click "Add" and enter URL: "http://struts.apache.org/dtds/tiles-config_1_2.dtd". However, I'm not sure where to point the "path" to since the DTD is contained within struts.jar (org.apache.struts.resources.struts-config_1_2.dtd). Anyone know how to do this?

]]>





3 comments

Did you try clicking on the "http://..." URL in the doctype, pressing
Alt+Enter, and choosing "Fetch resource"?

Kevin wrote:

I'd like to set intellij to recognize the tiles DTD (see below) so I can use the auto-complete and suggestion features. I'm pretty sure I need to go to "file" "settings", "resources" and then click "Add" and enter URL: "http://struts.apache.org/dtds/tiles-config_1_2.dtd". However, I'm not sure where to point the "path" to since the DTD is contained within struts.jar (org.apache.struts.resources.struts-config_1_2.dtd). Anyone know how to do this?

 	"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
> 	"http://struts.apache.org/dtds/tiles-config_1_2.dtd">]]>





0

I didn't but I just tried now and I get the error below. I'm not sure of the correct way to do this but maybe I can just specify the dtd that exists in struts.jar on my local machine? Or, if there's a more correct way, I'd prefer to do that.

java.io.FileNotFoundException: http://struts.apache.org/dtds/tiles-config_1_2.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:789)
at com.intellij.util.e.c.b(c.java:1)
at com.intellij.codeInsight.f.a.b.cv$2.run(cv$2.java:7)
at com.intellij.openapi.progress.a.a.runProcess(a.java:47)
at com.intellij.codeInsight.f.a.b.cv$4.run(cv$4.java:2)
at java.lang.Thread.run(Thread.java:534)

0

My bad. Your suggestion works. It's just that that particular DTD was not on their site. They've bumped it up to 1.3 instead of 1.2. Not sure why 1.2 is not there but that's a separate issue. Figures I picked an example where there was an unrelated problem - lol.

Thanks for you help.

0

Please sign in to leave a comment.