Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with Tiles and Custom Tags

843838Apr 4 2007 — edited Apr 4 2007
Hi! I've some problems with Struts and Tiles. My Tomcat doesn't execute custom tags within the pages I include with Tiles.

I've the following code:

/layouts/layout.jsp:
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<html:html>
<head>
<title><bean:message key="global.title"/></title>
</head>

<body>
<tiles:insert attribute="content"/>
</body>
</html:html>



index.jsp:
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<tiles:insert page="/layouts/layout.jsp" flush="true">
<tiles:put name="content" value="/common/menu.jspf"/>
</tiles:insert>



/common/menu.jspf:
<div id="navBar">
<div id="sectionLinks">
<h3>Section Links</h3>
<ul>
<li><html:link href="#">sectionLink</html:link></li>
<li><html:link href="#">sectionLink</html:link></li>
<li><html:link href="#">sectionLink</html:link></li>
<li><html:link href="#">sectionLink</html:link></li>
<li><html:link href="#">sectionLink</html:link></li>
<li><html:link href="#">sectionLink</html:link></li>
</ul>
</div>
</div>



Result:
menu.jspf's content is included in index.jsp but the <html:link> (or any other custom tag) isn't translated into <a> (like it should be).



Any ideas?
It's possible to do this, isn't it?
Where do I have to put the taglib directives?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2007
Added on Apr 4 2007
1 comment
118 views