Taglib in module not loaded for JBoss 7
juanm_med Nov 4, 2011 7:08 AMHi,
I'm trying to use Tiles in a web application with Jboss 7.0.1. I added
the necessary modules for Tiles to get loaded, but when I try to show
a page, the "http://tiles.apache.org/tags-tiles" taglib is not recognized.
At web.xml, I added the listener and the servlet, which work fine:
<listener>
<listener-class>org.apache.tiles.extras.complete.CompleteAutoloadTilesListener</listener-class>
</listener>
<servlet>
<servlet-name>Tiles Dispatch Servlet</servlet-name>
<servlet-class>org.apache.tiles.web.util.TilesDispatchServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Tiles Dispatch Servlet</servlet-name>
<url-pattern>*.tiles</url-pattern>
</servlet-mapping>
In my page, I declared the taglib:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:tiles="http://tiles.apache.org/tags-tiles">
Finally in one of my modules, I have tiles-jsp-2.2.2.jar with the taglib:
<tlib-version>1.2</tlib-version>
<short-name>tiles</short-name>
<uri>http://tiles.apache.org/tags-tiles</uri>
The tiles module is referenced by the application. I added the following
configuration at the pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<archive>
<manifestEntries>
<Dependencies>org.apache.tiles</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
I know that tiles is referenced because, if I delete the configuration
section above, the application doesn't deploy since some referenced
libraries are not present.
Shouldn't the taglib be automatically loaded as I include the
module as a dependency?
Attached to this message, you will find the modules and the test
application. After having added the modules and deployed the
application, you can see the result at:
http://localhost:8080/webapplication
The result is rather explicit:
Warning: This page calls for XML namespace
http://tiles.apache.org/tags-tiles declared with prefix tiles but no
taglibrary exists for that namespace.
Thank you for your help.
-
modules.zip 4.5 MB
-
webapplication.zip 16.4 KB