public final class LocaleAction extends BaseAction
Locale and forwards to a page, based on request level parameters
that are set (language, country, & page).messages| Constructor and Description |
|---|
LocaleAction() |
| Modifier and Type | Method and Description |
|---|---|
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Change the user's
Locale based on ActionForm properties. |
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServletpublic ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
Change the user's Locale based on 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 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".
execute in class Actionmapping - The ActionMapping used to select this instanceform - The optional ActionForm bean for this request (if any)request - The HTTP request we are processingresponse - The HTTP response we are creatingjava.lang.Exception - if an input/output error or servlet exception occursCopyright © 2000–2025 Apache Software Foundation. All rights reserved.