Thank you, I have understood!
Tom Schneider wrote: > > Checkout the I18NInterceptor: > http://struts.apache.org/2.0.11/docs/i18n-interceptor.html > > This interceptor picks up the request_locale parameter and sets the > locale. This happens even before the action is executed. > Tom > > > slideharmony wrote: >> >> I'm really going crazy with struts2 and request parameters, for example >> look at the following struts2blankapplication code: >> >> >> >> >> <h3>Languages</h3> >> <ul> >> <li> >> <s:url id="url" action="HelloWorld"> >> <s:param name="request_locale">en</s:param> >> </s:url> >> <s:a href="%{url}">English</s:a> >> </li> >> <li> >> <s:url id="url" action="HelloWorld"> >> <s:param name="request_locale">es</s:param> >> </s:url> >> <s:a href="%{url}">Espanol</s:a> >> </li> >> </ul> >> >> Ok, here it add a request parameter called request_locale to the url to >> set the language.. >> >> Here is the action: >> >> public class HelloWorld extends ExampleSupport { >> public String execute() throws Exception { >> setMessage(getText(MESSAGE)); >> return SUCCESS; >> } >> >> public static final String MESSAGE = "HelloWorld.message"; >> private String message; >> >> public String getMessage() { >> return message; >> } >> public void setMessage(String message) { >> this.message = message; >> } >> >> } >> >> >> >> Ok, how can it set the language if it don't retrieve the request_locale >> parameter?? >> >> Anybody could explain me how request parameters works? >> >> :-( >> > > -- View this message in context: http://www.nabble.com/struts2-blank-application-request-parameters-tf4861986.html#a13945693 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]