struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djia002 <>
Subject Struts2 Validation
Date Fri, 25 Jan 2008 01:13:56 GMT

Hello , I am new to struts2. Please help me on this problem.

I have a configuration like this 
        <action name="Action1.*" method="{1}" class="ActionClass1">
            <result name="summary">/page1.jsp</result>
            <result name="detail">/page2.jsp</result>

        <action name="Action2.*" method="{1}" class="ActionClass2">
            <result name="summary">/page1.jsp</result>
            <result name="detail">/page2.jsp</result>
            <result name="input">/page2.jsp</result>

The flow is I submit a form from page1 to Action ActionClass2.edit method, 

public String edit() throws Exception {

// fetch some data and push into session for rendering page2.jsp ...

return "detail"; // This will forward to page2.jsp

You can see from the code that edit() method try to store some data in
session for displaying page2.jsp.

Everything works fine until i added ActionClass2-validation.xml for
validating the form on page2.jsp.

I got error says "No result defined for action  and result input."
so I added <result name="input">page2.jsp</result> into configuration. and
then of course it just simply try to display page2.jsp without having data
preloaded by edit() because edit() not get called at all.

How can I work around with this problem?

Thanks in advance.
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message