You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/05/05 20:15:27 UTC

DO NOT REPLY [Bug 8817] New: - nested custom jsp tags not working?

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8817

nested custom jsp tags not working?

           Summary: nested custom jsp tags not working?
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: benjamin_valentine@yahoo.com


I can not get the example for jsp templates (using a few custom jsp tags) at 
http://developer.java.sun.com/developer/technicalArticles/javaserverpages/jsp_te
mplates/ to work on tomcat.  

The same code works as advertised in weblogic 6.1sp2.

The problem that i am seeing is that in the following code snippet, only the 
insert tag is executed.  It seems like the put tags are not executed at all.  
No errors are recieved.  I determined that the put tag is not being executed by 
inserting system outs in the doStartTag() method of the put TagSupport 
extension.

<template:insert template="/articleTemplate.jsp">
  <template:put ... />
  <template:put ... />
</template:insert>

The only thing that I wrote myself, besides a few basic hello world type jsps 
to display, is the following tld:

<?xml version="1.0" encoding="ISO-8859-1" ?>	
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag 
Library 1.2//EN"	
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

<taglib>
	<tlib-version>1.0</tlib-version>
	<jsp-version>1.1</jsp-version>
	<short-name>template</short-name>
	<tag>
		<name>insert</name>
		<tag-class>com.bjv.tags.templates.InsertTag</tag-class>
		<body-content>tagdependent</body-content>
		<attribute>
			<name>template</name>
		</attribute>
	</tag>
	<tag>
		<name>put</name>
		<tag-class>com.bjv.tags.templates.PutTag</tag-class>
		<body-content>tagdependent</body-content>
		<attribute>
			<name>name</name>
		</attribute>
		<attribute>
			<name>content</name>
		</attribute>
		<attribute>
			<name>direct</name>
		</attribute>
	</tag>
	<tag>
		<name>get</name>
		<tag-class>com.bjv.tags.templates.GetTag</tag-class>
		<body-content>tagdependent</body-content>
		<attribute>
			<name>name</name>
		</attribute>
	</tag>
</taglib>

While I am not completely new to creating custom jsp tags, I have not done it 
much so I would not be suprised if the problem is in the tld listed above.  
Hopefully this is the case.  This tld does work in weblogic though.

Can someone tell me if Tomcat supports the jsp features used in this example or 
not?

Thanks,
Ben

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>