I'm using Webwork 1.3 RC2, and indeed, that is the cause of the problem.  But
I've realized that using referrer won't solve my problem since it performs a
redirect.  (I need to do a forward.)  Here's my scenario:

A.jsp submits to Action.class
B.jsp submits to Action.class

Action.class needs to forward back to either A.jsp or B.jsp on invalid data.  I
need to *forward*, not redirect, since request params and error messages are
lost when you redirect.  

Since you can't do this in views.properties, I tried using the JSP action class
to forward back to A.jsp or B.jsp (determined by the referer header).  I could
see things happening on the server side, but on the client, I got no response. 
Looking at the code for JSP.java, I see that it uses a response wrapper that
consumes all write operations!?  

I then tried to manually use RequestDispatcher and forward to the referer that
way.  This worked, except that no error messages were being printed in the
forwarded jsp.  (Why?  I thought this approach would work.)

So the question is:  how can I dynamically forward to a jsp such that request
params and error messages will be seen in the jsp?


Thanks,
Ryan


> From: "Dick Zetterberg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Re: [OS-webwork] error using referrer.action
> Date: Tue, 27 May 2003 09:37:03 +0200
> Reply-To: [EMAIL PROTECTED]
>
> Hi Ryan,
> What version of WW are you using? If you are using 1.2.x or any of the =
> 1.3RC then you have a problem because you are adding errors so the =
> validate method in the Redirect action fails (the Referrer extends =
> Redirect).
> This has been fixed in the 1.3 final version so I recommend you try that =
> version instead. The fix was that the Redirect action now overrides the =
> validate method so that previous errors do not stop it from executing.
>
> Best regards,
>
> Dick Zetterberg
> [EMAIL PROTECTED]
>
> ----- Original Message -----=20
> From: "Ryan Schutt" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, May 26, 2003 10:16 PM
> Subject: [OS-webwork] error using referrer.action
>
>
> > In my views.properties, I have the line:
> >=20
> > my.action.class.input=3Dwebwork.action.standard.Referrer.action
> >=20
> > my.action.class does some validation in doValidation(), and adds error =
> messages
> > using addError().  However, when I submit the form to my.action.class =
> with bad
> > data, I get=20
> >=20
> > HTTP Status 404 - No view for result [input] exists for action
> > [my.action.class]
> >=20
> > This *only* happens when I try to use webwork.action.standard.Referrer =
> as my
> > view mapping.  Does anyone have any ideas what my be wrong?
> >=20
> > Thanks,
> > Ryan
> >=20
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
> > http://search.yahoo.com
> >=20

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to