ognl.OgnlException: target is null for setProperty 异常

这个异常是因为struts.xml配置文件中action的name属性写错了:

<action name="register"class="org.apache.struts.helloworld.action.Register" method="execute">
            <result name="success">/thankyou.jsp</result>
</action>

name属性应该和类的名字一样。

或者也有可能是配置文件中有重名的action。

 

posted on 2014-09-25 21:12  jyjsjd  阅读(440)  评论(0)    收藏  举报

导航