Hello:
I have been trying to migrate from 2.0.8 to 2.1. I had some problems which were
solved yesterday (thanks to you guys). But, now i am facing another problem
regarding tokenSession. The same piece of code was working in 2.0.8 but is not
working in 2.1. Actually it does work but at the sametime throws an exception
on the server. It says something like this.
expr: struts.token val: [Ljava.lang.String;@17aa55b context: [EMAIL PROTECTED]
843dcb root:[EMAIL PROTECTED], com.opensymphony.xwork2.DefaultText
[EMAIL PROTECTED] value: [Ljava.lang.String;@17aa55b
ognl.OgnlException: source is null for getProperty(null, "token")
My actionClass is
public class test extends ActionSupport
{
public String execute()
{
ActionContext.getContext().getSession().put("time",new
java.util.Date());
return SUCCESS;
}
}
My struts.xml is
<action name="TestDefaultAction" class="com.xyz.action.test"
method="input">
<interceptor-ref name="defaultStack"/>
<result
name="input">/WEB-INF/jsp/xyz/test.jsp</result>
</action>
<action name="TestInsertAction" class="com.xyz.action.test">
<result
name="input">/WEB-INF/jsp/xyz/test.jsp</result>
<result
name="error">/WEB-INF/jsp/xyz/test.jsp</result>
<result name="success"
type="redirect">/WEB-INF/jsp/xyz/test.jsp</result>
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="tokenSession"/>
<result name="invalid.token">/WEB-INF/jsp/xyz/test.jsp</result>
<result>/WEB-INF/jsp/xyz/test.jsp</result>
</action>
and my test.jsp is
<s:form name="frmFormBuilder" action="TestInsertAction.action" method="POST">
<s:token />
<s:submit />
</s:form>
As the code shows that it is quite a simple scenario. But, i dont know why it
is throwing errors. Your guidance is needed.
Regards,
Shoaib Ahmad
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]