struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thibaut <>
Subject Re: Validation Problem
Date Wed, 22 Mar 2006 19:14:45 GMT

I did what you tell me to do. Here is the simpliest thing that does'nt 
work :
In the WEB-INF/user/struts-config.xml

    <action    path="/insertANewCandidate"
       <forward name="success_from_tool" path="/close.jsp"/>
       <forward name="success" path="/mycv.jsp"/>

In the very first line of the action

public class UpdateResponsesForRequestAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws 
IOException, ServletException, UnknownSocietyException, SQLException

             return mapping.getInputForward();


There is a "essai.html" in ./ and in ./usr/ (from my webapp of course) 
and that still does'nt work !!!!
In case that help I use Struts 1.2.8, jdk1.4.2, Eclipse 3.1, linux 
(Mandriva 2006 Free)
I use the libraries i found in the struts-mailreader app in the struts 
1.2.8 zip file.
But i still have commons-digester.jar 1.5 because my app use rss object.


Rick Reumann a écrit :

> There are several things you can do to test. Your blank page has me 
> wondering if you are really even getting to where you 'think' you are. 
> The first thing you need to figure out is if what you think is 
> happening is really happening. Debugging Struts stuff can be a pain I 
> know:)
> I haven't seen your whole Action class, but put in some logging 
> statements or use a debugger and make sure you are even getting here:
> CandidateForm candidateForm = (CandidateForm) form;
>            ActionMessages errors = candidateForm.validate();
>            if (!errors.isEmpty()) {
>                this.saveErrors(request, errors);
>                return mapping.getInputForward();
>            }
> Then also print out the result of !errors.isEmpty. See if it's coming 
> back false.
> Then a few other things... Change your input page in your action 
> mapping to some simple jsp that just has the text "hello"  on it. Skip 
> your validation test above, but just try to return from your action 
> with return mapping.getInputForward() and see if you get to your 
> "hello" page.
> Without access to your app it's difficult to debug. You might not even 
> be executing the validation stuff above because of something else 
> going on and maybe you are forwarding to your resulting page (and 
> maybe that page doesn't exist?).
> First step is using a debugger or print out some log statements.

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

View raw message