On Tuesday 02 September 2008 00:08:40 Dave Newton wrote:
> --- On Mon, 9/1/08, Roger wrote:
> > One of the (many) messages I'm seeing is;
> > 02-Sep-2008 00:03:39
> > com.opensymphony.xwork2.interceptor.ParametersInterceptor
> > setParameters
> > SEVERE: ParametersInterceptor - [setParameters]: Unexpected
> > Exception caught
> > setting 'addressLine1' on 'class
> > com.vasilikon.HomeInsurance_1Action: Error
> > setting expression 'addressLine1' with value
> > '[Ljava.lang.String;@1980c26'
> >
> > If I really shouldn't be seeing this, I'll try and
> > strip things down to give a simple example.
>
Here is a stripped down version that shows the error message appearing in the
Tomcat logs.
Regards
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<constant name="struts.custom.i18n.resources" value="messages"/>
<!-- need this to use the spring object factory -->
<constant name="struts.objectFactory" value="spring" />
<!-- Configuration for the default package. -->
<package name="default" extends="struts-default">
<!-- Default interceptor stack. -->
<default-interceptor-ref name="paramsPrepareParamsStack"/>
<action name="test" class="com.vasilikon.TestAction">
<result name="success">/WEB-INF/jsp/Test.jsp</result>
<result name="screen2">/WEB-INF/jsp/TestConfirm.jsp</result>
</action>
</package>
</struts>
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.vasilikon;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;
import com.vasilikon.core.business.impl.service.TestQuotation;
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;
/**
*
* @author varleyr
*/
public class TestAction extends BaseAction implements Preparable,
SessionAware,
ModelDriven {
private Map session;
private TestQuotation quote;
public TestAction() {
}
public String execute() throws Exception {
return SUCCESS;
}
public void setSession(Map session) {
this.session = session;
}
public void prepare() throws Exception {
System.out.println("Prepare Called");
quote = (TestQuotation) session.get("TESTQUOTE");
if (quote == null) {
quote = new TestQuotation();
session.put("HOMEQUOTE", quote);
System.out.println("New Quotation Created");
}
else {
System.out.println("Quotation retrieved");
}
}
public String process() {
return "screen2";
}
public Object getModel() {
System.out.println("getModel() is called");
return quote;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.vasilikon.core.business.impl.service;
/**
*
* @author varleyr
*/
public class TestQuotation {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]