On Mon, 12 Mar 2001, Fred Lo wrote:

> Hello all,
> 
> I have an application that contain support for multiple languages, we opt 
> for the multiple language/multiple jsp option, where each language of the 
> system will contain its own set of jsp.
> 
> We now have a problem that during validation, when there is an error, we 
> would like the page forwarded back to the original jsp (of the originating 
> language). But right now the mapping only allow us to define one input form, 
> so upon looking at the source file, I think we can redefine 
> processValidate() of ActionServlet a bit, instead of getting the input form 
> from the mapping, we can get it from a parameter:
> 
> // Has an input form been specified for this mapping?
> String uri = (request.getParameter(Constants.INPUT_FORM));
> if (uri == null || uri.equals(""))
> { uri = mapping.getInput(); }
> ....
> 
> The idea is like this, is our approach correct? (pls don't say we shouldn't 
> have a duplicate set of jsp) Or there is some better way to achieve that?
>

Subclassing ActionServlet, and then overriding processValidate() to do
what you are describing above, certainly seems like a viable
approach.  This is the primary reason that the processing logic in
ActionServlet has been divided into so many protected methods - so that
you can easily specialize the parts you want, without having to recode the
entire processing flow.
 
> Thanks a lot.
> 
> Fred Lo

Craig


Reply via email to