Mantis - Resin
Viewing Issue Advanced Details
331 minor always 07-31-05 00:00 11-30-05 14:42
user330  
 
high  
closed 3.0.14  
3.0.14 fixed  
none    
none 3.0.15  
0000331: Problem with simple tag handlers in combination with jsp:include
RSN-375
Hi there.

I am experiencing problem with use of simple tag handlers in Resin (Tomcat works fine with the same

code).

I have JSP with the following sequence of tags:

<jsp:include ... />
<link>
 <message ... />
</link>
<jsp:include ... />

Link and message tags are my own tag handlers inherited from SimpleTagSupport. According to specification

I use invoke(Writer) method from JspFragment to process body content from doTag method.

Link tag has the following code which is processing body content:
        JspFragment body = getJspBody();
        String bodyContent = null;
        if ( body != null ) {
            StringWriter sw = new StringWriter();
            body.invoke(sw);
            bodyContent = sw.toString();
        }
I use acquired content further in the method and at the end write it to the page using

getJspContext().getOut().write(String) method.

Nested message tag writes some message to the output, using the same method.

According to specification, message tag actually must write to the StringWriter from the enclosing link

tag. It works fine, as I expected. But in this case second <jsp:include ... /> tag does not produce

anything. Furthermore, this tag is invoked, but there is no output on my page.

When I remove nested message tag, and put static text instead, all is working fine and second page is

successfully included in the JSP I am testing.

Can someone tell me whatta hell is happening? Why second page is not included if there is another simple

tag handler inside link tag? Why it is included when there is a static text?

I use Resin 3.0.14 and JDK 1.4.

Thanks in advance.
Windows XP SP1, JDK 1.4, Resin 3.0.14

Notes
(0000376)
ferg   
07-31-05 00:00   
jsp/18eg