Taglib problem in web project?

Hi,

I have the following taglib in my web.xml file:

weblogic-tags.tld /WEB-INF/lib/weblogic-tags.jar ]]>

When I try to compile the project with a WEB project setup, I get hundreds
of:

File "/weblogic-tags.tld" not found

error messages. Should Idea's web support be able to support
taglib-locations that are jar files? I have added the
/WEB-INF/lib/weblogic-tags.jar to my project classpath and this makes no
difference?

Thanks
Scott


8 comments
Comment actions Permalink

AFAIK jar files are not supported yet. Search in forums and tracker, you'll find some discussions about this issue.

0
Comment actions Permalink

I'm using struts (struts.jar) and the logic/bean tld's in my project and
don't get any complaints when I compile; or are you discussing another
issue?

Martin Fuhrer wrote:

AFAIK jar files are not supported yet. Search in forums and tracker, you'll find some discussions about this issue.


0
Comment actions Permalink

Scott Curtis wrote:

Hi,

I have the following taglib in my web.xml file:

<taglib>
<taglib-uri>weblogic-tags.tld</taglib-uri>
<taglib-location>/WEB-INF/lib/weblogic-tags.jar</taglib-location>
</taglib>

When I try to compile the project with a WEB project setup, I get hundreds
of:

File "/weblogic-tags.tld" not found

error messages. Should Idea's web support be able to support
taglib-locations that are jar files? I have added the
/WEB-INF/lib/weblogic-tags.jar to my project classpath and this makes no
difference?


I'm not 100 sure Scott, but I don't think this looks right.

Typically for Struts you'd have something like:

struts-logic /WEB-INF/tlds/struts-logic.tld Note how the URI is like a 'shortcut name' and the taglib location is where the tld is not the jar file. Then in the JSP you do this: Then the TLD should be pointing to the class it needs: org.apache.struts.taglib.logic.EqualTag]]>

Which simply means that your jar file should be in your WEB-INF/lib
directory so it loads properly into the web container.

Hope this helps.

0
Comment actions Permalink

Adding one more thing, if you don't have the tld, or the tld is stored
in the jar, just decompile the jar, get the tld out, and use it that
way. It's more portable that way anyway.

R

Robert S. Sfeir wrote:

Scott Curtis wrote:

>> Hi,
>>
>> I have the following taglib in my web.xml file:
>>
>> >> weblogic-tags.tld >> /WEB-INF/lib/weblogic-tags.jar >> >> >> When I try to compile the project with a WEB project setup, I get >> hundreds >> of: >> >> File "/weblogic-tags.tld" not found >> >> error messages. Should Idea's web support be able to support >> taglib-locations that are jar files? I have added the >> /WEB-INF/lib/weblogic-tags.jar to my project classpath and this makes no >>]]> difference?


I'm not 100 sure Scott, but I don't think this looks right.

Typically for Struts you'd have something like:

<taglib>
<taglib-uri>struts-logic</taglib-uri>
<taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>
</taglib>

Note how the URI is like a 'shortcut name' and the taglib location is
where the tld is not the jar file.

Then in the JSP you do this:

<%@ taglib uri="struts-logic" prefix="logic" %>
<logic:redirect forward="welcome"/>

Then the TLD should be pointing to the class it needs:

<tag-class>org.apache.struts.taglib.logic.EqualTag</tag-class>

Which simply means that your jar file should be in your WEB-INF/lib
directory so it loads properly into the web container.

Hope this helps.


0
Comment actions Permalink

The way I got this to work with weblogic was to add the tld
as an URI in the IDE settings - ressources
Just specify the location of "weblogic-tags.tld" as
c:\bea\weblogic700\portal\lib\web\weblogic-taglib.jar
(or something like that - hunt around for the correct jar). Then idea will
apparently ignore the web.xml entry.

Of course, this is then not per project, but it's better than nothing.




"Scott Curtis" <scurtis@smart421.com> skrev i en meddelelse
news:bj4p5i$6vo$1@is.intellij.net...

Hi,

>

I have the following taglib in my web.xml file:

>

<taglib>
<taglib-uri>weblogic-tags.tld</taglib-uri>
<taglib-location>/WEB-INF/lib/weblogic-tags.jar</taglib-location>
</taglib>

>

When I try to compile the project with a WEB project setup, I get hundreds
of:

>

File "/weblogic-tags.tld" not found

>

error messages. Should Idea's web support be able to support
taglib-locations that are jar files? I have added the
/WEB-INF/lib/weblogic-tags.jar to my project classpath and this makes no
difference?

>

Thanks
Scott

>
>


0
Comment actions Permalink

Niels Ull Harremoës wrote:

The way I got this to work with weblogic was to add the tld
as an URI in the IDE settings - ressources
Just specify the location of "weblogic-tags.tld" as
c:\bea\weblogic700\portal\lib\web\weblogic-taglib.jar
(or something like that - hunt around for the correct jar). Then idea will
apparently ignore the web.xml entry.


Actually in 922 idea will ignore the jar too. It seems to want the tld,
and tld only, especially when it comes to code completion.

What I usually do is I unjar the file, get the tld out, and just use the
tld outside the jar file and I keep it around for other projects. I
guess I don't care which standard is used, I wish people would stick to
one and use it. Apache foundation jars up the tld for JSTL, but for
Struts they're outside the jar... someone make up their mind.

Either way this needs to be filed as a bug with JetBrains, if it hasn't
already (I think it has), and if it has someone needs to push on it a
little more. I'm doing pushing on other JSP stuff right now :)

R


Of course, this is then not per project, but it's better than nothing.




"Scott Curtis" <scurtis@smart421.com> skrev i en meddelelse
news:bj4p5i$6vo$1@is.intellij.net...

>>Hi,
>>
>>I have the following taglib in my web.xml file:
>>
>> >> weblogic-tags.tld >> /WEB-INF/lib/weblogic-tags.jar >> >> >>When I try to compile the project with a WEB project setup, I get hundreds >>of: >> >>File "/weblogic-tags.tld" not found >> >>error messages. Should Idea's web support be able to support >>taglib-locations that are jar files? I have added the >>/WEB-INF/lib/weblogic-tags.jar to my project classpath and this makes no >>difference? >> >>Thanks >>Scott >> >>]]>



0
Comment actions Permalink

+I guess I don't care which standard is used, I wish people would stick to one and use it. Apache foundation jars up the tld for JSTL, but for Struts they're outside the jar... someone make up their mind.
+

The reason for this is: with Servlet 2.3 containers you don't need the TLD in a separate file, the container will scan all JARs in WEB-INF/lib for matching TLDs automatically - that's why they're not coming extracted with JSTL (which mandates using a Servlet 2.3 container - Struts only Servlet 2.2, so they have to unpack the TLDs to put them someplace under WEB-INF/)

Cheers

Yann

0
Comment actions Permalink

On Fri, 12 Sep 2003 06:28:45 +0000, Yann Cebron wrote:

+I guess I don't care which standard is used, I wish people would stick to one and use it. Apache foundation jars up the tld for JSTL, but for Struts they're outside the jar... someone make up their mind.
+

The reason for this is: with Servlet 2.3 containers you don't need the TLD in a separate file, the container will scan all JARs in WEB-INF/lib for matching TLDs automatically - that's why they're not coming extracted with JSTL (which mandates using a Servlet 2.3 container - Struts only Servlet 2.2, so they have to unpack the TLDs to put them someplace under WEB-INF/)

Cheers

Yann

Heh you learn something new every day. THANKS!

Point is then, that IDEA needs to support that then. I'll have to see if
there is a bug filed on it.

R

0

Please sign in to leave a comment.