Re: Struts7 debug-tag with rendering problem
Lukasz Lenart <[email protected]> Tue, 1 Apr 2025 11:43:11 +0200
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Message-ID | <CAMopvkPpbZ3V6u6p9X9DtsHxAy4ho=8v5Hy7=7AvhYmpcftr-g@mail.gmail.com> |
Do you use Struts 7.0.3? I addressed some issues around <s:debug/> in this version https://issues.apache.org/jira/browse/WW-5517 Also you can take a look on the Debugging example https://github.com/apache/struts-examples/tree/main/debugging-struts Cheers Lukasz czw., 27 mar 2025 o 10:25 Ute Kaiser <[email protected]> napisał(a): > > > 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: [email protected] > For additional commands, e-mail: [email protected] >