You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Crawford, Preston" <Pr...@acs-inc.com> on 2007/04/20 00:09:31 UTC
[S1] The proper way to define taglibs in a jsp file
So I'm helping my company clean up some JSP files, things like that and I'm
seeing declarations like this.
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>
Now I know there is a way to do these same declarations (we're on struts
1.2.9) without actually having to install the TLDs into our build process.
I've been Googling to figure out the "right" way, but I'm finding different
URLs. So I thought I'd ask if someone knew what the proper way to declare
these ways or point me in the direction of a site for 1.2.9 so that perhaps
I could make these declarations without having to declare the URI in
web.xml, etc.
Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
Re: [S1] The proper way to define taglibs in a jsp file
Posted by Paul Benedict <pb...@apache.org>.
On 4/19/07, Crawford, Preston <Pr...@acs-inc.com> wrote:
>
> So I'm helping my company clean up some JSP files, things like that and
> I'm
> seeing declarations like this.
>
> <%@ taglib uri="/bean" prefix="bean" %>
> <%@ taglib uri="/html" prefix="html" %>
>
>
The ability to automatically find TLD files is a feature of the web
container, not of Struts. If you're using a 2.3 container, the tag
libraries will be found under the URI that's specified in their DTDs.
While I may be wrong, I think between Struts 1.2.9 and 1.3.5, Struts
switched from jakarta.apache.org to struts.apache.org and thus you find
different URIs between versions. As for the URIs you see above, those are
from developers defining the location of the TLD explicitly in their web.xml
Paul
RE: [S1] The proper way to define taglibs in a jsp file
Posted by "Karr, David" <da...@wamu.net>.
You can search through all your documentation, but there's a more
"direct" (some might say indirect, but whatever) way.
Open up the jar file that the taglib refers to, using winzip, the
Eclipse Zip Editor, or whatever. Select the TLD file. Open it into a
plain text editor. Find the "uri" element. Use that.
> -----Original Message-----
> From: Crawford, Preston [mailto:Preston.Crawford@acs-inc.com]
> Sent: Thursday, April 19, 2007 3:10 PM
> To: user@struts.apache.org
> Subject: [S1] The proper way to define taglibs in a jsp file
>
> So I'm helping my company clean up some JSP files, things
> like that and I'm seeing declarations like this.
>
> <%@ taglib uri="/bean" prefix="bean" %>
> <%@ taglib uri="/html" prefix="html" %>
>
> Now I know there is a way to do these same declarations
> (we're on struts
> 1.2.9) without actually having to install the TLDs into our
> build process.
> I've been Googling to figure out the "right" way, but I'm
> finding different URLs. So I thought I'd ask if someone knew
> what the proper way to declare these ways or point me in the
> direction of a site for 1.2.9 so that perhaps I could make
> these declarations without having to declare the URI in web.xml, etc.
>
> Preston
> CONFIDENTIALITY NOTICE: This e-mail message, including any
> attachments, is for the sole use of the intended recipient(s)
> and may contain confidential and privileged information. Any
> unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of
> the original message.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org