custom tag library support broken in 4.5?

i can't get idea4.5 to see my custom tag libraries.
my settings (working fine in idea 4.0) are:

web.xml:
struts-tiles /WEB-INF/struts/tld/struts-tiles.tld ]]>

my .tld files are in directory /foo/bar , and i have web module settings | resource directory with /foo/bar mapped to /WEB-INF/struts/tld

in idea 4.5 i get "cannot resolve tag library" on .jsp pages. in idea 4.0 the exact same settings work fine

please help me if you know a workaround (other than linking the .tld files to /WEB-INF/struts/lib directory in web module root)

thanks in advance

0
11 comments

Michal Bazynski wrote:

i can't get idea4.5 to see my custom tag libraries.
my settings (working fine in idea 4.0) are:

web.xml:
<taglib>
<taglib-uri>struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts/tld/struts-tiles.tld</taglib-location>
</taglib>

my .tld files are in directory /foo/bar , and i have web module settings | resource directory with /foo/bar mapped to /WEB-INF/struts/tld

in idea 4.5 i get "cannot resolve tag library" on .jsp pages. in idea 4.0 the exact same settings work fine

please help me if you know a workaround (other than linking the .tld files to /WEB-INF/struts/lib directory in web module root)

thanks in advance

Do your tlds point to local dtds? That's a known bug in 4.5. Just point
them so Sun's site.

0
Avatar
Michal Bazynski

what I have is:

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

:(

interestingly enough, when i view the struts-tiles.tld file idea 4.0 shows it has errors, while idea 4.5 says everything is fine... i guess i need idea 4.2 :)

0

i've found my problem: 4.5 does not allow the same directories to be content root directories for multiple web modules. idea 4.0 did, and these settings in 4.5 did not work.

i would like to ask for advice then:

i have many web modules, all using struts-.tld files. i would like to avoid copying the .tld files to every module, and have all the modules see the single copy of struts.tld files i have in a seperate directory instead. is there any way to force 4.5 to accept it?

thanks in advance,
mike

0

Michal Bazynski wrote:

i've found my problem: 4.5 does not allow the same directories to be content root directories for multiple web modules. idea 4.0 did, and these settings in 4.5 did not work.

i would like to ask for advice then:

i have many web modules, all using struts-.tld files. i would like to avoid copying the .tld files to every module, and have all the modules see the single copy of struts.tld files i have in a seperate directory instead. is there any way to force 4.5 to accept it?

thanks in advance,
mike

Dependent Web modules? 4.5 does support this.

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

I have the exact same problem with tag libraries. My project consists of an EJB module and a Web Module. Web module is dependent on EJB. Everything works fine aside from tag-libraries, which are in /tlds inside a resource directory I mapped to /WEB-INF.

I checked the dtd information in the tag-libs: they go to the sun website. The really bizzare thing is that they worked for a little bit after I did the initial mapping, but then after I restarted IDEA they stopped working, and have not worked since...

0

Michal:
I am setting up Intellij IDEA 4.5, but my jsp include such as:

<%@include file="chksession.jsp"%>

cannot be resolved, even though it is in the same directory.

can you tell me how to fix it?

thanks a lot.

dave

0

Has this been resolved?

I'm evaluating 4.5.3 and get the same errors! file can't be included and taglib can't be referenced.

0

Hello Thomas,

Has this been resolved?

I'm evaluating 4.5.3 and get the same errors! file can't be included
and taglib can't be referenced.


Make sure that your JSPs and taglibs are located under the Web
Resource directory of the Web Module.

You can get the sample working project here:
ftp://intellij.net/pub/.idea/idea-struts-tomcat5-sample.zip .

--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Hi Serge

Thanks a lot for the example. This really helped me a lot. I had some bogus settings in my WebModule. For some reason i had set the WEB-INF directory as content root and I completely overlook this. After I corrected it every thing went very smooth.

Thanks again

Thomas

0

Hi All!

For example, in my tag was such string


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "file://./web-jsptaglibrary_1_1.dtd">

The problem disappear when I change it to

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

0

Hi All,

I had the same problem as romanso (i.e. a dtd reference via a file:// url instead of the http:// one). Correcting this re-enabled parsing.

However I'm not too happy about this, because I'm not the author of the tld files I'm using, as they are part of another product. That means that each time I re-deploy the product in question I'll have to amend all the included tlds, or alternatively lobby the vendor to change them on the grounds that IDEA does not like a file:// dtd url ...

Does someone know a way round this issue ?

Many thanks

Nick

0

Please sign in to leave a comment.