无法加载配置。- 行动 -
文件:/D:/DATA/STUDY/anup/Struts2Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/FirstStrutsApplication/WEB-INF/classes/struts.xml:6:55 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) 在 org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) 在 org.apache.struts2.dispatcher.Dispatcher.init( Dispatcher.java:418) 在 org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) 在 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)在 org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281) 在 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262) 在 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746) 在 org.apache.catalina.core.StandardContext 的 org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:107)。 startInternal(StandardContext.java:5399) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org .apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread。运行(未知来源)原因:找不到动作类 [com.javatpoint.Product] - 动作 - 文件:/D:/DATA/STUDY/anup/Struts2Workspace/.metadata/.plugins/org.eclipse.wst.server。 core/tmp1/wtpwebapps/FirstStrutsApplication/WEB-INF/classes/struts.xml:6:55 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:409) at com.opensymphony.xwork2.config .providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:354) 在 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:468) 在 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider .java:264) 在 org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111) 在 com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193) 在 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
struts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "struts.apache.org/dtds/struts-2.0.dtd">;
<struts>
<package name="default" extends="struts-default">
<action name="getTutorial" class="com.anup.work.TutorialAction" method="execute">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>