杨庆荣的博客

http://www.wudimei.com/yangqingrong
ecshop、zencart二次开发、discuz x2插件开发。QQ2903595522
访问博客

Unable to instantiate Action

发布时间 2014-01-10 18:25:12    点击(6128)

Unable to instantiate Action, registerBean,  defined for 'register' in namespace '/'registerBean
com.opensymphony.xwork2.XWorkException
    at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:312)
    at

...

 

<bean id="smtp" class="com.wudimei.mail.Smtp">
        <property name="host" value="smtp.qq.com" />
    </bean>
    <bean id="registerBean" class="com.wudimei.user.RegisterAction" scope="prototype">
        <property name="userService" ref="userService"></property>
        <property name="smtp" ref="smtp"></property>
       
    </bean>

 

<package name="user" namespace="/" extends="struts-default">
       
        <action name="register" class="registerBean">
           
            <result name="register">/templates/user/register.jsp</result>
            <result name="input">/templates/user/register.jsp</result>
        </action>
    </package>

 

proxy = getActionProxy("/user/register.do");

struts2的action在配置时要使用bean id做为class的值。

能输出了,做一下笔记。

 

评论

Name(名字):*
Email:*
QQ:*
*
(*are required,带*号的要求输入。)


个人资料

用户名 yangqingrong
真实姓名