[Struts] Blank Page after submit

Discussions

Web tier: servlets, JSP, Web frameworks: [Struts] Blank Page after submit

  1. [Struts] Blank Page after submit (7 messages)

    Hi, i hope this wasn't covered before, i used the search function and found nothing.

    I am learning to work with struts, after i click on submit button (in a form) i get a blank page

    struts-config.xml :

    <struts-config>
        <!-- Form Bean Definitions -->
        <form-beans>
            <form-bean name="eTrackingForm" type="eTrackingForm"/>
        </form-beans>
        <!-- Action Mapping Definitions -->
        <action-mappings>
            <action path="/setupeTrackingForm" forward="/eTrackingForm.jsp"/>

               <action path="/inserteTracking"
                type="inserteTrackingAction"
                name="eTrackingForm"
                scope="request"
                validate="false"
    input="/eTrackingForm.jsp"
                >
                <forward
                        name="success"
                        path="/confirmation.jsp"/>

            </action>

        </action-mappings>
        <!-- message resources -->
        <message-resources
            parameter="ApplicationResources"
            null="false" />
    </struts-config>

    Is something wrong there? if you need more files please tell me, i do not know what more to do, i check everything many times...

    Threaded Messages (7)

  2. I've seen this sadly enough.[ Go to top ]

    I've noticed that if you forward in your Action class to "nowhere" then it will truely take you to nowhere without throwing an error, so I would suggest double checking that the mapping you are trying to go to is "success" not succes" or something like that.
  3. spelling fine[ Go to top ]

    Thanks for the answer Kris, i re-checked what you said, and the spelling is fine. :(

    Thanks
  4. more files ?[ Go to top ]

    i just wonna be sure....
    you did write an action at the declared source path that returned a forward to success, did you ?
  5. Action[ Go to top ]

    inserteTrackingAction.java:

    public final class inserteTrackingAction extends Action {


    public ActionForward Execute(ActionMapping actionmapping, ActionForm actionform, HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws Exception
    {
    eTrackingService etrackingservice = new eTrackingService();

    eTrackingForm etrackingform = (eTrackingForm)actionform;
    eTrackingDTO etrackingdto = new eTrackingDTO();
    BeanUtils.copyProperties(etrackingdto,etrackingform);
    etrackingservice.inserteTracking(etrackingdto);
    httpservletrequest.setAttribute("eTracking",etrackingdto);

    return actionmapping.findForward("success");

    }

    }
  6. Anyone ?[ Go to top ]

    Anyone ?

    Thanks
  7. execute VS. Execute[ Go to top ]

    It looks like the signature of your execute method is Execute(...) with a capital "E". Could it be that your execute method is not being invoked because of this?
  8. thanks![ Go to top ]

    it was that!! i lost hours trying to figure it out!!!!

    thanks!