Cannot resolve tag library

Build 3296.
I use in my jsp taglibs.
The old build IDEA (1172) excellent worked with this taglibs:

...


[WEB-INF/tlds/dmform_1_0.tld]




...

]]>


The DTD file is placed in /WEB-INF/tlds

but the new build (3296) - not wont work 8(
(with message: "Cannot resolve tag library")
???

10 comments

Hi,
Ensure that the tld is available on Deployment View of J2EE pane (thus
it is copied to exploded directory)

Vladimir wrote:

Build 3296.
I use in my jsp taglibs.
The old build IDEA (1172) excellent worked with this taglibs:

 [hello.jsp]
> ..
> 
> ..
> 
> 
> [WEB-INF/tlds/dmform_1_0.tld]
> 
> 
> 
> 
> ..
> 
> ]]>


The DTD file is placed in /WEB-INF/tlds

but the new build (3296) - not wont work 8(
(with message: "Cannot resolve tag library")
???



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

0

Yes, the tld is available on deploy...
IDEA a can run & debug my project. But can't a normal edit jsp files with tag libs - the all of RED color 8(

0

I am seeing exactly the same problem with exactly the same file, the Documentum dmform_1_0.tld file. To make it even weirder, I have brought in the dmform from their 5.2.5 SP1 and SP3 apps. If I name them dmform_1_0.wp.sp1.tld and dmform_1_0.wp.sp3.tld, the taglib uri resolves and the tags work properly, e.g. I can get tag and attribute suggestions, etc. When I rename the exact same files to dmform_1_0.tld, the uri doesn't resolve and the tags are no longer recognized.

One thing that needs to be done with these files is to change the reference in the DOCTYPE from file://./web-jsptaglibrary_1_1.dtd (or something like that) to http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd. So the 2nd line of your dmform_1_0.tld (and dmformext_1_0.tld and whatever others you might have) should read:

]]>


I just reinstalled, so I've done that with all of my taglibs. All of them properly resolve. Except for dmform_1_0.tld. It seems like the unworking file is getting cached somewhere and not refreshed. I've done all kinds of things: synchronized, restarted IDEA, deleted dmform_1_0.tld and copied it back in, and all kinds of things. I'm really at a loss as to how to resolve this.

0

OK, I figured out what the problem was. At one point, while trying to figure out the answer to the problem caused by using the file://./web-jsptaglibrary_1_1.dtd, I had set up that particular resource, /WEB-INF/tlds/dmform_1_0.tld, as an external resource in Project Settings->Resources. That worked fine as long as I had everything installed in the same place and that was still a valid file. But this time it pointed to a previous location for the file, since I just moved Tomcat from the default Windows install in C:\Program Files\Apache Tomcat 4.0. to a top-level directory in C:\Tomcat-4.0. Thus, IJ was trying to resolve the /WEB-INF/tlds/dmform_1_0.tld resource to a location that no longer existed. Once I removed that resource definition (I actually found it by grepping through the entire IJ installation! :), the TLD is resolving properly now (albeit with the modified DOCTYPE reference).

0

Hi Rick,
I also having the same issue with tag lib,just made a Web application,copied the whole webtop into the project,added jar/classes & /WEB-INF/tlds to classpath.

taglib on all jsp pages are showing up in red.

Any pointers?

Thanks in Advance

-Indy

0

Indy,

There are a few things to check:

  • As noted, change the DOCTYPE declaration in the Dctm-supplied TLD files.

  • As also noted, check and make sure that you don't have the TLD files set up as external resources.

  • Finally, go to your project settings and select the Web Modules Settings tab for the module containing your web app. Make sure that the Web Resource Directories entries are all pointing to the appropriate directories. We just found this problem with another guy in my office, where he had moved the directory physically, but this hadn't been changed in the web resource directory, so it was trying to resolve the /WEB-INF directory to a location that either no longer existed or didn't contain the appropriate files.


Once you've done all that, your taglib references should fix, but the actual tags will still probably show up as unresolved, i.e. this will work:

<%@ taglib uri="/WEB-INF/tlds/dmform_1_0.tld" prefix="dmf" %>

But this won't:

<dmf:label ... />

For that, just close IDEA and restart. The tags should resolve properly after that.

0

Thanks for the quick reply.

Modified DOCTYPE declaration,removed all resources entries and edited Web Application to pick the correct web.xml....restarted intelli ....:( .. no luck.

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

If you don't mind can you send me "iml" file for the project,looks I'm missing something.....

Thanks a lot for your help & time.

0

Hi,
Ensure that the tld is available on Deployment View of J2EE pane (thus
it is copied to exploded directory)

Indraj wrote:

Thanks for the quick reply.

Modified DOCTYPE declaration,removed all resources entries and edited Web Application to pick the correct web.xml....restarted intelli ....:( .. no luck.

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

If you don't mind can you send me "iml" file for the project,looks I'm missing something.....

Thanks a lot for your help & time.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Yes,tht was the problem.

Thank you, guys

0

Hi, i 'm evaluation IJ 5. by converting my old IJ 3.5 project.

TLD are not recognized correctly.

I checked following elements

  • Doc Type is ok

  • TLD are not set up as external resources

  • Web resource directory are set for WEB-INF & jsp


as a result, taglib references are resolved but the tag are not.

For exemple, this is not recognized:
<dmf:label ... />

0

Please sign in to leave a comment.