org.apache.struts.actions
public final class LocaleAction extends Action
Field Summary | |
---|---|
Log | log
Commons Logging instance. |
Method Summary | |
---|---|
ActionForward | execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) Change the user's {@link java.util.Locale} based on {@link ActionForm} properties. |
Change the user's {@link java.util.Locale} based on {@link ActionForm} properties.
This Action
looks for language
and
country
properties on the given form, constructs an
appropriate Locale object, and sets it as the Struts Locale for this
user's session.
Any ActionForm
, including a
{@link org.apache.struts.action.DynaActionForm}, may be used.
If a page
property is also provided, then after
setting the Locale, control is forwarded to that URI path.
Otherwise, control is forwarded to "success".
Parameters: mapping The ActionMapping used to select this instance form The optional ActionForm bean for this request (if any) request The HTTP request we are processing response The HTTP response we are creating
Returns: Action to forward to
Throws: java.lang.Exception if an input/output error or servlet exception occurs