Error Parametersinterceptor
here for a quick overview of the site Help Center Detailed answers error setting expression with value struts2 to any questions you might have Meta Discuss the workings parameters interceptor example struts2 and policies of this site About Us Learn more about Stack Overflow the company Business
Unexpected Exception Caught Setting On Class Error Setting Expression With Value
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Com.opensymphony.xwork2.ognl.ognlvaluestack : Error Setting Expression
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Unexpected Exception caught setting 'xxx' on 'class xxx: Error setting expression 'xxx' with value ['x', ] up vote 3 down vote favorite 5 I'm passing unexpected exception caught setting '_' on 'class some parameters to an action class implementing ModelDriven through a query-string. Click The action class is as follows. @Namespace("/admin_side") @ResultPath("/WEB-INF/content") @ParentPackage(value = "struts-default") public final class TestAction extends ActionSupport implements Serializable, Preparable, ModelDriven { private static final long serialVersionUID = 1L; private Transporter transporter = new Transporter(); @Action(value = "Test", results = { @Result(name = ActionSupport.SUCCESS, location = "Test.jsp"), @Result(name = ActionSupport.INPUT, location = "Test.jsp")}, interceptorRefs = { @InterceptorRef(value = "paramsPrepareParamsStack", params = {"params.acceptParamNames", "transporterId, transporterName"})}) public String load() throws Exception { return ActionSupport.SUCCESS; } @Action(value = "EditTest", results = { @Result(name = ActionSupport.SUCCESS, location = "Test.jsp"), @Result(name = ActionSupport.INPUT, location = "Test.jsp")}, interceptorRefs = { @InterceptorRef(value = "paramsPrepareParamsStack", params = {"params.acceptParamNames", "transporterId, transporterName"})}) public String edit() { System.out.println(transporter.getTransporterId() + " : " + transporter.getTransporterName()); return ActionSupport.SUCCESS; } @Override public
here for a quick overview of
Interceptor-ref Name= Params
the site Help Center Detailed answers to any questions struts2 interceptor request parameters you might have Meta Discuss the workings and policies of this site About error setting expression submit' with value ['submit', ] Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions http://stackoverflow.com/questions/21018018/unexpected-exception-caught-setting-xxx-on-class-xxx-error-setting-expressio Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ParametersInterceptor error: Unexpected Exception caught, Error http://stackoverflow.com/questions/27778644/parametersinterceptor-error-unexpected-exception-caught-error-setting-expressi setting expression up vote 1 down vote favorite 1 I have a table inside a form that contains dropdowns and a hidden input. JSP:
ModifyFacultyAction: public class Modif
blog, projects and photography of Eric Martin home blog projects photography about contact home / blog / Struts 2 ParametersInterceptor Apr 05 2008 5 Struts 2 ParametersInterceptor Are your logs being filled http://www.ericmmartin.com/struts-2-parametersinterceptor/ up with errors like: ERROR - ParametersInterceptor.setParameters(204) | ParametersInterceptor - [setParameters]: Unexpected Exception caught setting '_' on 'class com.company.web.MyAction: Error setting expression '_' with value '[Ljava.lang.String;@1491ddc' If so, it's because Struts 2 is parsing the query http://grokbase.com/t/struts/user/07355swass/parametersinterceptor-error string/post data and trying to "set" a value for each parameter it finds. I'm working on an Struts 2 application utilizing the jQuery JavaScript library for the UI and the Displaytag tag library for displaying tables. error setting With jQuery, I'm using the "no-cache" option (cache: false) on all Ajax calls, which adds "_=timestamp" to each request. Since I don't have a property called "_" in my Action class, I get an error (mentioned above) in my logs for each request. Same with Displaytag, except the parameters causing errors are in the form of "d-#-X", where "#" is a unique id (usually 4 or 5 digits) and "X" is either p, error setting expression s or o. They are used to determine the page (p) and/or the table sort order (o for asc/desc and s for which column). The solution: configure Struts (struts.xml) to ignore these parameters: _,d-\d+?-[sop] If you have a different parameters that are causing problems, just put them in the excludeParams node, comma separating multiple parameters. Tweet Topics: Bugs, Frameworks, Java Symbolic links in Windows CSS Naked Day 2008 5 Comments CemoJuly 25, 2008 @ 11:15 am #Thanks. Very useful. s2-newBSeptember 19, 2008 @ 5:12 pm #prototype.js (v1602) appends an additional request parameter ('&_=') for certain browsers. To suppress via code, implement ParameterAware like so: @SuppressWarnings("unchecked") @Override public void setParameters(Map parameters) { // prototype.js appends a request parameter '_=' if (parameters.get("_") != null) { parameters.remove("_"); } } Eric MartinSeptember 19, 2008 @ 8:39 pm #@s2-newB - Thanks for the suggestion. Since that is the same parameter that jQuery uses, wouldn't the excludeParams example that I gave do the same thing? TimOctober 27, 2008 @ 2:47 pm #Thanks, man! That really helped me out! PrasnathSeptember 3, 2009 @ 3:11 am #Thanks eric , After long search i got here .... you are a
some values and sets this bean intosession. On the next page I displays these values in a form by, whenI am submitting the formI am geting following error:ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor]ParametersInterceptor - [setParameters]: Unexpected Exception catched: Errorsetting expression 'field1' with value '[Ljava.lang.String;@1d15d1c'.Any Idea what is going wrong? and how to fix it. I am using Struts 2.0.6.Thanks in advance.RegardsSyed Ali--View this message in context: http://www.nabble.com/ParametersInterceptor-Error-tf3351751.html#a9320642Sent from the Struts - User mailing list archive at Nabble.com. reply Tweet Search Discussions Search All Groups user 4 responses Oldest Nested Sfali Hi All, I have following scenario: In my Action I set my pojo bean with some values and sets this bean into session. On the next page I displays these values in a form by , when I am submitting the form I am geting following error: ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor] ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'field1' with value Sfali at Mar 5, 2007 at 9:43 pm ⇧ Hi All,I have following scenario:In my Action I set my pojo bean with some values and sets this bean intosession. On the next page I displays these values in a form by, whenI am submitting the formI am geting following error:ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor]ParametersInterceptor - [setParameters]: Unexpected Exception catched: Errorsetting expression 'field1' with value '[Ljava.lang.String;@1d15d1c'.Any Idea what is going wrong? and how to fix it. I am using Struts 2.0.6.Thanks in advance.RegardsSyed Ali--View this message in context: http://www.nabble.com/ParametersInterceptor-Error-tf3351752.html#a9320645Sent from the Struts - User mailing list archive at Nabble.com. reply | permalink Dariusz Wojtas What is the type of 'field1'? Is it's String representation passed from the form compatible with what the data type converter expects? I have seen problems like this for properties of type java.util.Date and locale on the server machine different that EN. SImilar problems with Double/Float and non default comma separator. You may try to use custom data converters here. regards Dariusz Wojtas --------------------------------------------------------------------- To unsubscribe, e-mail: Dariusz Wojtas at Mar 5, 2007 at 9:50 pm ͣ