我已经使用struts运行了Web应用程序。我无法运行应用程序我在启动apache tomcat错误时遇到错误,并且在运行Web应用程序时它也会抛出错误。我已经发布了下面的错误日志并对此有所帮助。我是netbeans的新手启动apache时出错tomcat服务器
请参考图片
opentestdrive.com/demo/test/4.png,opentestdrive.com/demo/test/3.png opentestdrive.com/demo/test/2.png opentestdrive.com/demo/test/1.png
Feb 04, 2016 3:19:55 PM org.apache.catalina.core.StandardContext filterStartSEVERE: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
运行Web应用程序时出错:
Undeploying ...
undeploy?path=/Loyalty4Salon
OK - Undeployed application at context path /Loyalty4Salon
In-place deployment at /home/revathy/Documents/Esa netbeans/loyalty_salon/loyalty_salon/build/web
Deployment is in progress...
deploy?config=file%3A%2Ftmp%2Fcontext2062383266810619779.xml&path=/Loyalty4Salon
FAIL - Deployed application at context path /Loyalty4Salon but context failed to start
/home/revathy/Documents/Esa netbeans/loyalty_salon/loyalty_salon/nbproject/build-impl.xml:1125: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 2 seconds)
这是struts-config.xml
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
<forward name="welcome" path="/Welcome.do"/>
</global-forwards>
<action-mappings>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
</action-mappings>
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<message-resources parameter="com/myapp/struts/ApplicationResource"/>
<!-- ========================= Tiles plugin ===============================-->
<!--
This plugin initialize Tiles definition factory. This later can takes some
parameters explained here after. The plugin first read parameters from
web.xml, thenoverload them with parameters defined here. All parameters
are optional.
The plugin should be declared in each struts-config file.
- definitions-config: (optional)
Specify configuration file names. There can be several comma
separated file names (default: ?? )
- moduleAware: (optional - struts1.1)
Specify if the Tiles definition factory is module aware. If true
(default), there will be one factory for each Struts module.
If false, there will be one common factory for all module. In this
later case, it is still needed to declare one plugin per module.
The factory will be initialized with parameters found in the first
initialized plugin (generally the one associated with the default
module).
true : One factory per module. (default)
false : one single shared factory for all modules
- definitions-parser-validate: (optional)
Specify if xml parser should validate the Tiles configuration file.
true : validate. DTD should be specified in file header (default)
false : no validation
Paths found in Tiles definitions are relative to the main context.
-->
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
<!-- ========================= Validator plugin ================================= -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
这是struts.xml
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_index.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="c_cpnDetail"
class="com.Customer.Action"
method="c_cpnDetail" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/cmpny_couponDetail.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="coupon_index"
class="com.Customer.Action"
method="couponCode" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_create.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="createCoupon"
class="com.Customer.Action"
method="create_Coupon" >
<interceptor-ref name="tokenSession"/>
<interceptor-ref name="fileUpload">
<param name="allowedTypes">
image/png,image/gif,image/jpeg,image/pjpeg
</param>
</interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
<result name="invalid.token" type="redirect">coupon</result>
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_index.jsp</result>
<result name="error">/error.jsp</result>
<result name="input">/ImageFileUploadError.jsp</result>
</action>
<!--<action name="couponAssignPage"
class="com.Customer.Action"
method="advSrch" >
<result name="success">./coupon_Assign.jsp</result>
<result name="error">./error.jsp</result>
</action> -->
<action name="couponAssignPage"
class="com.Customer.Action"
method="cpn_assignPage" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_Assign.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="cpn_getUsers"
class="com.Customer.Action"
method="cpn_getUsers" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_Assign.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="coupon_assign"
class="com.Customer.Action"
method="assign_coupon" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_index.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="couponAssign"
class="com.Customer.Action"
method="coupon_assign">
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_index.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="csvExport"
class="com.Customer.Action"
method="csvExport">
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/csvDownload.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="search_usr"
class="com.Customer.Action"
method="srch_usr1" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_assign.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="deleteCoupon"
class="com.Customer.Action"
method="dltCoupon" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_index.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="del_cpn"
class="com.Customer.Action"
method="bulk_cpn_del" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_index.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="c_edit"
class="com.Customer.Action"
method="editCouponretrieve" >
<result name="logoutPage">/sa_login.jsp</result>
<result name="success">/coupon_edit.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="editCoupon"
class="com.Customer.Action"
method="editCoupon" >
<interceptor-ref name="fileUpload">
<param name="allowedTypes">
image/png,image/gif,image/jpeg,image/pjpeg
</param>