Hi,
using <s:debug/> in jsp causes my XML-Output to crash.
I thought I needed it because my jsp does not display the expected output and 
therefore I wanted to inspect the value stack.
Any help appreciated to use this tag.
Best regards Ute


XML-Verarbeitungsfehler: Nicht übereinstimmendes Tag. Erwartet: </table>.
Adresse: http://myURL
Zeile Nr. 46, Spalte 7:
    </tr>
------^

Translation: XML-error: not matching tag. expected: </table>

Browser source shows:
<h2>Struts ValueStack Debug</h2>
<br>

<h3>Value Stack Contents</h3>
<table class="debugTable">
    <tr><th>Object</th><th>Property Name</th><th>Property 
Value</th><th>Property Class</th></tr>

    <tr>
        <td rowspan="20">xx.yyy.zzzz.MyAction</td>

              
            <td style="background-color:#CCCCCC;">container</td>
            <td style="background-color:#CCCCCC;">There is no read method for 
container</td>
            <td style="background-color:#CCCCCC;">class java.lang.String</td>
    </tr>
              
            <td style="background-color:#BBBBBB;">actionErrors</td>
            <td style="background-color:#BBBBBB;">[]</td>
            <td style="background-color:#BBBBBB;">class 
java.util.LinkedList</td>
    </tr>

I found \struts-7.0.3\src\core\src\main\resources\template\simple\debug.ftl, 
but I am not familiar with #list to fully understand.

<a href="#" id="toggle-button">[Debug]</a>
<div style="display:none" id="<#if 
attributes.id??>${attributes.id}<#else>debug</#if>">
<h2>Struts ValueStack Debug</h2>
<br>

<h3>Value Stack Contents</h3>
<table class="debugTable">
    <tr><th>Object</th><th>Property Name</th><th>Property 
Value</th><th>Property Class</th></tr>

    <#assign index=1>
    <#list attributes.stackValues as stackObject>
    <tr>
        <td rowspan="${stackObject.value.size()}">${stackObject.key}</td>

        <#assign renderRow=false>
        <#list stackObject.value.keySet() as propertyName>
            <#if renderRow==true></tr><tr><#else> <#assign renderRow=false> 
</#if>
            <td style="background-color:<#if (index % 2) == 
0>#BBBBBB<#else>#CCCCCC</#if>;">${propertyName}</td>
            <td style="background-color:<#if (index % 2) == 
0>#BBBBBB<#else>#CCCCCC</#if>;"><#if 
stackObject.value.get(propertyName)??>${stackObject.value.get(propertyName).toString()}<#else>null</#if></td>
            <td style="background-color:<#if (index % 2) == 
0>#BBBBBB<#else>#CCCCCC</#if>;"><#if 
stackObject.value.get(propertyName)??>${stackObject.value.get(propertyName).class}<#else>null</#if></td>
    </tr>
            <#assign index= index + 1>
        </#list>
    </#list>
</table>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to