亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Struts2 HTTP Status 500 - Unable to instantiate Action

Struts2 HTTP Status 500 - Unable to instantiate Action

T王者歸來 2017-08-10 16:46:42
報錯信息HTTP Status 500 - Unable to instantiate Action, org.ssh.product.action.ProductAction, defined for 'product_save' in namespace '/'org.ssh.product.action.ProductAction我的模型是package?org.ssh.product.action; …… @Controller??//將這個action交給spring管理 @Scope("prototype")?//作用域?為多實例 public?class?ProductAction?extends?ActionSupport?{ ……我的struts.xml是???<package?name="product"?extends="struts-default"?namespace="/"??strict-method-invocation="false"> ????????<!--?保存商品?--> ????????<action?name="product_save"?class="org.ssh.product.action.ProductAction"?method="{1}Product"> ????????????<result>WEB-INF/view/index.jsp</result> ????????????<result?name="input">WEB-INF/view/index.jsp</result> ????????</action> ????</package>我的spring 開啟自動掃描了<context:component-scan?base-package="org.ssh.*"/>我的web.xml????<!--?配置Struts2過濾器?--> ????<filter> ????????<filter-name>struts2</filter-name> ????????<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> ????</filter> ????<filter-mapping> ????????<filter-name>struts2</filter-name> ????????<url-pattern>/*</url-pattern> ????</filter-mapping> ????? ????<!--?配置Spring的監聽器?--> ????<listener> ????????<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> ????</listener> ????<!--?指定Spring配置文件所在路徑?--> ????<context-param> ????????<param-name>contextConfigLocation</param-name> ????????<param-value>classpath:applicationContext.xml</param-value> ????</context-param>
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1412 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號