struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rubens Gomes <rubens_go...@hotmail.com>
Subject spring struts 2: Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.$Proxy164
Date Sun, 30 Jul 2017 19:00:28 GMT
I am using the Spring + Struts 2 Plugin, and I am getting an error from the Struts2 ParameterInteceptor
(see below) when setting request parameters sent on the URL.  My Actions are being created
by the Spring factory.  And I *do* have the proper properties setters in my class (see below).

In the URL below, the "lang" and "redirectURL" , both lang/redirectURL are not being set.

http://localhost:8080/locale/change-locale.do?lang=en&redirectURL=%2Fsecurity%2Fview-login.do


07-30 13:49:05.187 DEBUG [http-nio-8080-exec-5] c.o.x.i.ParametersInterceptor - Setting params
lang => enredirectURL => 
07-30 13:49:05.188 DEBUG [http-nio-8080-exec-5] c.o.x.i.ParametersInterceptor - Parameter
[lang] was accepted and will be appended to action!
07-30 13:49:05.188 DEBUG [http-nio-8080-exec-5] c.o.x.i.ParametersInterceptor - Parameter
[redirectURL] was accepted and will be appended to action!
...
07-30 13:49:05.235 ERROR [http-nio-8080-exec-5] c.o.x.i.ParametersInterceptor - Developer
Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.$Proxy164: Error setting
expression 'lang' with value ['en', ]
07-30 13:49:05.236 DEBUG [http-nio-8080-exec-5] c.o.x.c.i.InstantiatingNullHandler - Entering
nullPropertyValue [target=[com.ezlista.web.struts2.action.ChangeLocaleAction@4bfd8bce, com.opensymphony.xwork2.DefaultTextProvider@18e0976d],
property=devmode]
07-30 13:49:05.245 ERROR [http-nio-8080-exec-5] c.o.x.i.ParametersInterceptor - Developer
Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'redirectURL' on 'class com.sun.proxy.$Proxy164: Error
setting expression 'redirectURL' with value ['', ]



@Scope("request")
@Controller
@SuppressWarnings("serial")
@Namespace("/locale")
@Results( {
  @Result(name=Action.INPUT,
          location="/error.do",
          type="dispatcher"),
  @Result(name=Action.SUCCESS,
          location="${redirectURL}",
          type="dispatcher")
} )
public class ChangeLocaleAction extends BaseAction
{
    private String lang;
    private String redirectURL;


    public ChangeLocaleAction()
    {
        super();
    }


   @Override
    public String execute()
    {
//  code not displayed....
    }


    /**
     * @return the redirectURL
     */
    public String getRedirectURL()
    {
        return redirectURL;
    }



    /**
     * @param url the redirectURL to set
     */
    public void setRedirectURL(String url)
    {
  //  _--------->>>>>> NOT BEING CALLED <<<< --------
        this.redirectURL = url;
    }


    /**
     * @return the lang
     */
    public String getLang()
    {
        return lang;
    }


    /**
     * @param lang the lang to set
     */
    public void setLang(String lang)
    {
  //  _--------->>>>>> NOT BEING CALLED <<<< --------
        this.lang = lang;
    }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message