You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ach <as...@gmail.com> on 2006/08/09 12:03:18 UTC

How to define a local TLD in web.xml (DRY principle!!!)

I entered below section in my web.xml because of not repeating 
<%@ taglib=blaBla in each jsf page:
  
  <jsp-config>
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
    <tablig-location>/tld/myfaces_core.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
    <tablig-location>/tld/myfaces_html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://myfaces.apache.org/tomahawk</taglib-uri>
    <tablig-location>/tld/tomahawk.tld</taglib-location>
    </taglib>
   </jsp-config>

It seems that it does not work for me. Is there another way to achieve my
goal?

 PS: I am using eclipse wtp and my directory schema is such as:
MyApp/WebContent/WEB-INF/tld and all tld files are in this tld folder.

 -Thanks in advance
-- 
View this message in context: http://www.nabble.com/How-to-define-a-local-TLD-in-web.xml-%28DRY-principle%21%21%21%29-tf2077762.html#a5722904
Sent from the Tomcat - User forum at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to define a local TLD in web.xml (DRY principle!!!)

Posted by Ach <as...@gmail.com>.
Thanks It works now. I have a syntax error in tags too!
-- 
View this message in context: http://www.nabble.com/How-to-define-a-local-TLD-in-web.xml-%28DRY-principle%21%21%21%29-tf2077762.html#a5725676
Sent from the Tomcat - User forum at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to define a local TLD in web.xml (DRY principle!!!)

Posted by David Smith <dn...@cornell.edu>.
The taglib-location element is relative to the context as in 
/WEB-INF/tld/myfaces_core.tld

--David

Ach wrote:

>I entered below section in my web.xml because of not repeating 
><%@ taglib=blaBla in each jsf page:
>  
>  <jsp-config>
>    <taglib>
>    <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
>    <tablig-location>/tld/myfaces_core.tld</taglib-location>
>    </taglib>
>    <taglib>
>    <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
>    <tablig-location>/tld/myfaces_html.tld</taglib-location>
>    </taglib>
>    <taglib>
>    <taglib-uri>http://myfaces.apache.org/tomahawk</taglib-uri>
>    <tablig-location>/tld/tomahawk.tld</taglib-location>
>    </taglib>
>   </jsp-config>
>
>It seems that it does not work for me. Is there another way to achieve my
>goal?
>
> PS: I am using eclipse wtp and my directory schema is such as:
>MyApp/WebContent/WEB-INF/tld and all tld files are in this tld folder.
>
> -Thanks in advance
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org