為什么我找不到action是500錯誤。。。
HTTP Status 500 - Unable to instantiate Action, com.imooc.Action.HelloWorlsddAction, defined for 'HelloWorlsdd' in namespace '/'com.imooc.Action.HelloWorlsddAction
type?Exception report
message?Unable to instantiate Action, com.imooc.Action.HelloWorlsddAction, defined for 'HelloWorlsdd' in namespace '/'com.imooc.Action.HelloWorlsddAction
description?The server encountered an internal error that prevented it from fulfilling this request.
exception
Unable to instantiate Action, com.imooc.Action.HelloWorlsddAction, ?defined for 'HelloWorlsdd' in namespace '/'com.imooc.Action.HelloWorlsddAction
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:319)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:400)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:194)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:501)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
root cause
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
? ? "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
? ? "http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
? ? <package name="default" ?extends="struts-default" namespace="/">
? ? ? ? ?<default-action-ref name="index"></default-action-ref>
? ? ? ? ?<action name="index" >
? ? ? ? ? <result>/error.jsp</result>
? ? ? ? ?</action>
? ? ? ? ?
? ? ? ? ?<action name="*_*" method="{2}" class="com.imooc.Action.{1}Action">
? ? ? ? ? <result>/result.jsp</result>
? ? ? ? ? <result name="add">/{2}.jsp</result>
? ? ? ? ? <result name="update">/{2}.jsp</result>
? ? ?</action>
? ? ? ??
? ? ? ??
?</package>
</struts>
2016-12-27
把包名也寫成通配符替換就可以了