Struts 找不到我的 .class

Struts can't find my .class

我有这个代码:

我不明白这个错误:

INFO - 27/06/17 09:38 - Initializing composable request processor for module prefix '/reportes' 

WARN - 27/06/17 09:38 - Unhandled exception 
org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.
    at org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)
    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

在您的配置中,您缺少 path 属性中的斜杠。

<struts-config>
    <form-beans>
        <form-bean name="pruebaForm" type="yourpackage.PrubaForm"/>
    </form-beans>

    <action-mappings>

        <action
            path="/reportes"
            name="pruebaForm"
            type="yourpackage.PrubaAction">
            <forward name="si" path="/reportes.jsp" />
            <forward name="no" path="/no.jsp" />        
    </action-mappings>
</struts-config>