struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slideharmony <>
Subject struts2 blank application request parameters
Date Fri, 23 Nov 2007 14:17:23 GMT

I'm really going crazy with struts2 and request parameters, for example look
at the following struts2blankapplication code:

        <s:url id="url" action="HelloWorld">
            <s:param name="request_locale">en</s:param>
        <s:a href="%{url}">English</s:a>
        <s:url id="url" action="HelloWorld">
            <s:param name="request_locale">es</s:param>
        <s:a href="%{url}">Espanol</s:a>

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 {
        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

Anybody could explain me how request parameters works?

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message