Now, the action is executed all right, but the form that is sent to the action is completely empty. Every field is null. Does anyone have any idea why this happens and how to fix it?




It sounds like you are not returning an ActionForward from your action execute method. Make sure that you have a forward configured under your action or a global forward. Returning null will result in a blank page.


Yes. Returning a null forward will result in a blank page. However, that's not what's happening. The Action does return a forward. What's happening is that the Servlet apparently creates a new ActionForm object that is empty instead of using the one tha user filled in. For clarity, the action looks something like this:

<action path="/event" type="com.acme.MyAction">
<forward name="success" path="/event.faces" />
</action>


public ActionForward execute(ActionMapping mapping,
           ActionForm form,
           HttpServletRequest request,
           HttpServletResponse response) {
   log.info(((EventForm)form).getDesc());

   return mapping.findForward("success");
}

No matter what the user writes, the log will show that the the string is null.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to