Are you familiar with my project Paul? If not, I'll briefly explain (otherwise, just skip to the third paragraph)...
It is a project that allows Actions to be exposed as Web Services with no changes to the existing code. All a developer has to do is add a plug-in, and optionally a new webservices-config.xml file, and the Actions can be called by SOAP clients without doing anything more. However, one of the things that is lacking in the current version is proper handling of form validation errors. I think essentially the request would die a horrible death at worst, and at best just return gibberish, because the errors are not handled in any way. I need to add that capability. To address your specific question, the input page is irrelevant in this situation because input did not come from that page. However, I want such a request to return a "real" error message, still as a valid SOAP-based response. As all the output is now generated by JSP templates, it makes sense to do the same to handle these validation errors. So, I therefore need a way to make the RequestProcessor (where all the things that make this work in the first place are done) forward to a JSP, regardless of what the input page attribute might say. Alternatively, a developer would have to add an extra mapping for every Action they want to expose as a service, but that is contrary to my "quick ,easy and transparent" goal that I've been following all along. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, February 2, 2005 12:46 pm, Benedict, Paul C said: > Frank, > > I am not sure of why you need this solution. I never came across your need > -- and perhaps because I never encountered the problem. > > I can't imagine why you would want to dynamically control the input page. > For instance, I use MappingDispatchAction and each action entry has its > own > specified input and success forward. > > Is your question actually posed by a misdesign? > > Thanks, > Paul > > -----Original Message----- > From: Frank W. Zammetti (MLists) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 02, 2005 12:39 PM > To: dev@struts.apache.org > Subject: Extending RequestProcessor to handle validation errors > > > Hi folks... I'm working on an update of my Struts Web Services project, > and I can't seem to work out how to do something... > > What I want to do is have a way to redirect to a given JSP when ActionForm > validation errors occur that will OVERRIDE whatever might be configured in > the action mapping. In other words... in a normal application, validation > errors occur and we get forwarded back to the input page. I want to be > able to redirect to a different JSP, REGARDLESS of what the input page is. > > I looked at overriding the processValidate() method of RequestProcessor, > but I don't see how that can work... Looking at the source of the original > RP (v1.1 this all is) I see that it does the forward and then returns a > boolean, true if no errors occur or false otherwise, so it doesn't look > like I have the opportunity to do something like the following > psuedo-code: > > myOverriden_ProcessValidate() { > > boolean b = super.processValidate(); > if (!b) { > forward to my jsp > } > > } > > ... because by the time I hit my check of b, the forward or redirect has > already been done. Is it possible to override the forward or redirect > that the super.processValidate() could do? I didn't think so. Am I > missing the obvious somewhere on how to do this, or maybe I'm barking up > the wrong tree to begin with? Thanks all! > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > ------------------------------------------------------------------------------ > Notice: This e-mail message, together with any attachments, contains > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New > Jersey, USA 08889), and/or its affiliates (which may be known outside the > United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as > Banyu) that may be confidential, proprietary copyrighted and/or legally > privileged. It is intended solely for the use of the individual or entity > named on this message. If you are not the intended recipient, and have > received this message in error, please notify us immediately by reply > e-mail and then delete it from your system. > ------------------------------------------------------------------------------ >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]