Hi Jelle, Thanks for pointing this out. Actually this particular error was a typing error. I have edited my question. I am still getting the error that I had originally mentioned.
Hmm, this should work, provided you're deploying correctly on a JSP 2.0 compliant servlet container, which Apache Tomcat 6.0.26 is.
Could you provide a little more info on the file structure of the web application and maybe the relevant bits of the web.xml?
My web.xml file contains mappings for filters, listeners and servlets. I have not indicated the mappings in this post as I have not used web.xml file for this particular page. I mean, I have placed my tag files in the 'tags' directory and have mentioned the directory path on the JSP as the value of the taglib's 'tagdir' attribute.
I also want to point out that my other tags where <jsp:attribute> is not used are working fine.
Yeah, I tried by removing all filter and listener mappings in web.xml file. I also tried using different browsers (Chrome & Internet Explorer). But <jsp:attribute> action does not work on my JSP.
One of the errors that i faced was due to a comment that was written between the container tag and the jsp:attribute tag. It basically means that there should be no content (not even a comment) between <template:page> and the <jsp:attribute> tags
For example: Using the same example given above. If i add a comment.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="template" tagdir="/WEB-INF/tags/mypagetemplates" %>
<template:page>
<!- some useless comment which will throw this subelement error ->
<jsp:attribute name="headContent">
some html stuff
</jsp:attribute>
<jsp:body>
main html content
</jsp:body>
</template:page>
Post by:autobot
machines help you to do more, but experience less. Experience this tiny ad:
a bit of art, as a gift, the permaculture playing cards