Struts2的简单实现

写这篇博客是因为配置这个简单的demo花费了2个小时的时间,经历了如下错误

java.util.concurrent.ExecutionException: org.apache.catalina.Li
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/logging/log4j/Logger;
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleExcept
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.St
java.lang.NoSuchMethodException

解决方法是通过导入相关的jar包实现的,这里出现了由于jar版本不同而导致的错误

一、struts.xml的配置






/hello.jsp


二、web.xml的配置



  qweq
 
    struts2
    org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
 
 
   struts2
   /*
 

三、资源结构图

Struts2的简单实现_第1张图片

四、资源下载路径

https://download.csdn.net/download/qq_38345598/12564344

你可能感兴趣的:(java)