You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joachim Ansorg <ja...@ksi.gr> on 2007/11/27 17:02:56 UTC

Empty pages returned for actions - how do I debug this?

Hi all,
I'm still new to Struts 2. I like the framework as a whole. A part which 
I find quite difficult to use is the debugging support. 
But I guess I'm missing something.

I have sometime the problem that Struts returns an empty page. Nothing, 
no html at all.
No exception in the log, even using the DEBUG level of Log4J. I even 
stepped through the whole struts action method invocation including all 
interceptors. Couldn't find it.

Several tries later to guess the reason it's usually a tag with wrong 
params or something similair.

How do I debug this kind of problem?
devMode is set. I'm using 2.1.1-SNAPSHOT, but also tried 2.1.0 and 
2.0.11. I'm also using Spring.

An example which I could not figure out so far:
This form makes the page to display empty.
After removing the <s:token/> tag it displays just fine, with or without 
the TokenInterceptor enabled for the action.

<s:form action="tag" method="post">
    <s:hidden name="id" value="%{id}" />
    <s:token />
   
    <%-- Basic information --%>
    <s:if test="%{id}">
        <s:textfield key="tag.id" value="%{tag.id}" readonly="true" />
    </s:if>
    <s:textfield key="tag.name" value="%{tag.name}" name="tag.name" />

    <div style="margin: 25px 0;">
        <s:submit key="button.save" action="tag" method="save" 
theme="simple" requiredposition="right"/>
        <s:submit key="button.cancel" action="tagList" theme="simple" />
    </div>
</s:form>

Thank you for hints or solutions!
Joachim

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