|Re: developing taglibs [message #201143 is a reply to message #201008]
||Wed, 03 October 2007 18:01
| Larry Isaacs
Registered: July 2009
I believe if you want the TLD file to be in the WEB-INF directory, you |
will have to put it directly in the WebContent/WEB-INF directory of your
dynamic web project. I'm not aware of a way to get it there from the
utility project. You do have the option of packaging the TLD in the
utility jar deployed in the webapp from the utility project. The TLD
would need to go in the META-INF directory of that jar, or a
subdirectory of META-INF. You can create a META-INF directory, and any
subdirectories, under the root of the Java source directory of your
utility project and put the TLD in there.
> I think I'm missing something here, so let me explain what I need again:
> I have dynamic web project. I want to use some taglibs in that project.
> What the dynamic web project needs is:
> 1. The taglib classes (jared or unjared)
> 2. The TLDs for the taglibs
> Both are found in a different, java, project.
> What I did is add the taglibs (java) project to the dynamic web
> project's 'J2EE Module Dependencies'. This imports the taglib clases
> into the dynamic web projects, but not the TLDs. I can see this when I
> export the project to a WAR file and look into it - the TLDs are not in
> the WEB-INF directory.
> Now my question again:
> Where should I place the TLDs in the taglibs project, so that they are
> "exported" to the dynamic web project (and put in the WEB-INF dir)?
> "Nitin Dahyabhai" <firstname.lastname@example.org> wrote in message
>>> "Nitin Dahyabhai" <email@example.com> wrote in message
>>>> zohar wrote:
>>>>> I'm wrote some taglibs and want to use them in a dynamic web
>>>>> project I have. What is the right way to do that? I can tell my web
>>>>> project that it depends on the taglibs project, but how do I make
>>>>> it recognize the tld?
>>>> It should be automatic as long as you're using 1.5.5 or a release
>>>> candidate for 2.0.1.
>> zohar wrote:
>> > Automatic how? Where do I put the TLDs?
>> > BTW: any tutorial about this?
>> The simplest thing to do is to set a URI value within the TLD and
>> reference that within the JSP file using a taglib directive. But like
>> I said it's best to use either 1.5.5 or 2.0.1 for this.
>> Nitin Dahyabhai
>> Structured Source Editing
Powered by FUDForum
. Page generated in 0.02088 seconds