struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Beech" <a.be...@bigpond.net.au>
Subject RE: [S2] Referencing the taglib when the JARS's are located at the top level of an EAR package?
Date Sun, 30 Dec 2007 23:36:40 GMT
G'day all,

I put a copy of the struts-tags.tld in WEB-INF and added the appropriate
<taglib>...</taglib> reference in web.xml and this seems to have solved my
immediate problem.  However to be honest I'm not satisfied with this
approach and was wondering if there is something else which could be done so
that it is unnecessary to place a copy of the .tld (from the struts distro)
in the WEB-INF directory for each of the application modules within the EAR
package?

At present the structure of my "test" EAR is:

  + lib/
  + META-INF/
  + Tinker-app-1.war
  + Tinker-app-2.war

The common libraries in the top level lib directory are exposed to the
application modules with a <library path="lib"/> reference in the
orion-application.xml file located under META-INF.

I'm now wondering if rejigging the taglib definition so that it uses an
absolute URI would resolve the issue?

Cheers.
AB

-----Original Message-----
From: Simon Berger [mailto:bagpacksimon@gmx.net] 
Sent: Friday, 28 December 2007 10:32 PM
To: Struts Users Mailing List
Subject: Re: [S2] Referencing the taglib when the JARS's are located at the
top level of an EAR package?

not sure if i got your problem right but you can add something like this 
to your web.xml

    <taglib>
        <taglib-uri>/struts-tags</taglib-uri>
        <taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
        <taglib-prefix>s</taglib-prefix>
    </taglib>


then you can use <%@taglib prefix="s" uri="/struts-tags" %>
and it should map to the location sepcified in web.xml

but the libs still need to be in the classpath


Adrian Beech schrieb:
> G'day all,
>
> I've been tinkering with Struts for the first time over the past few days
> and have come across a small issue with the way I'm building/packaging the
> EAR file and how the JSP's reference the Struts taglib.  The various JAR's
> are bundled at the top level of the EAR package in a "lib" directory.
Using
> the "<%@ taglib prefix="s" uri="/struts-tags" %>" in the JSP's is giving
me
> no end of grief as I'm assuming, going by the error messages, /struts-tags
> cannot be resolved.  Moving the relevant JARS to the WEB-INF/lib directory
> appears to work just dandy.  Can someone please enlighten me on what I
need
> to do to fix this situation, i.e. do I need to use a different URI, add
> something to the manifest, add something to either the
> META-INF/application.xml or META-INF/orion-application.xml files, etc?
>
> I'm using the bundled instance of OC4J which comes with JDeveloper 10G.
At
> this stage though the test applications are not being maintained within
> JDeveloper... all aspects of the application are coded from scratch and
> built using a custom ANT build script.
>
> No doubts this question highlights my obvious lack of knowledge regarding
> Struts and especially relating to the creation of EAR's, etc.  I've more
> than likely missed something in both the Oracle and Struts documentation
> which covers this sort of issue?
>
> Thanks for your assistance with this one.  It'll be greatly appreciated!
>
> Cheers.
> AB
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



__________ NOD32 2754 (20071228) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message