struts2.1笔记06:struts2开发环境的搭建实际操作出现的问题

1.我根据新建一个struts工程之后,启动报错,如下:

  1 六月 29, 2015 3:08:18 下午 org.apache.catalina.core.AprLifecycleListener init
  2 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\software\myeclipse\install\binary\com.sun.java.jdk7.win32.x86_1.7.0.u45\bin;D:\software\myeclipse\install\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_11.0.0.me201211151802\tomcat\bin
  3 六月 29, 2015 3:08:18 下午 org.apache.coyote.http11.Http11Protocol init
  4 信息: Initializing Coyote HTTP/1.1 on http-8080
  5 六月 29, 2015 3:08:18 下午 org.apache.catalina.startup.Catalina load
  6 信息: Initialization processed in 579 ms
  7 六月 29, 2015 3:08:18 下午 org.apache.catalina.core.StandardService start
  8 信息: Starting service Catalina
  9 六月 29, 2015 3:08:18 下午 org.apache.catalina.core.StandardEngine start
 10 信息: Starting Servlet Engine: Apache Tomcat/6.0.13
 11 六月 29, 2015 3:08:20 下午 org.apache.struts2.dispatcher.Dispatcher error
 12 严重: Dispatcher initialization failed
 13 java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
 14     at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
 15     at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
 16     at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
 17     at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
 18     at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
 19     at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
 20     at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
 21     at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
 22     at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
 23     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:351)
 24     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
 25     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
 26     at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
 27     at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
 28     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
 29     at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
 30     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
 31     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 32     at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
 33     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 34     at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
 35     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
 36     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 37     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 38     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 39     at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 40     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 41     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 42     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 43     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 44     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 45     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 46     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
 47     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 48     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 49     at org.apache.catalina.core.StandardService.start(StandardService.java:516)
 50     at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 51     at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
 52     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 53     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 54     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 55     at java.lang.reflect.Method.invoke(Method.java:606)
 56     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 57     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 58 Caused by: java.lang.reflect.InvocationTargetException
 59     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 60     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 61     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 62     at java.lang.reflect.Method.invoke(Method.java:606)
 63     at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
 64     ... 43 more
 65 Caused by: java.lang.ExceptionInInitializerError
 66     at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
 67     ... 48 more
 68 Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!
 69     at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:168)
 70     ... 49 more
 71 Caused by: java.lang.ClassNotFoundException: javassist.ClassPool
 72     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
 73     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
 74     at java.lang.Class.forName0(Native Method)
 75     at java.lang.Class.forName(Class.java:190)
 76     at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)
 77     ... 49 more
 78
 79 六月 29, 2015 3:08:20 下午 org.apache.catalina.core.StandardContext filterStart
 80 严重: Exception starting filter struts2
 81 java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
 82 File: ContainerImpl.java
 83 Method: inject
 84 Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
 85     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
 86     at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
 87     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
 88     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 89     at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
 90     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 91     at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
 92     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
 93     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 94     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 95     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 96     at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 97     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 98     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 99     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
100     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
101     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
102     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
103     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
104     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
105     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
106     at org.apache.catalina.core.StandardService.start(StandardService.java:516)
107     at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
108     at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
109     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
110     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
111     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
112     at java.lang.reflect.Method.invoke(Method.java:606)
113     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
114     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
115 Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
116     at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
117     at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
118     at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
119     at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
120     at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
121     at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
122     at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
123     at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
124     at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
125     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:351)
126     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
127     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
128     at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
129     at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
130     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
131     ... 29 more
132 Caused by: java.lang.reflect.InvocationTargetException
133     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
134     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
135     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
136     at java.lang.reflect.Method.invoke(Method.java:606)
137     at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
138     ... 43 more
139 Caused by: java.lang.ExceptionInInitializerError
140     at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
141     ... 48 more
142 Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!
143     at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:168)
144     ... 49 more
145 Caused by: java.lang.ClassNotFoundException: javassist.ClassPool
146     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
147     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
148     at java.lang.Class.forName0(Native Method)
149     at java.lang.Class.forName(Class.java:190)
150     at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)
151     ... 49 more
152
153 六月 29, 2015 3:08:20 下午 org.apache.catalina.core.StandardContext start
154 严重: Error filterStart
155 六月 29, 2015 3:08:20 下午 org.apache.catalina.core.StandardContext start
156 严重: Context [/struts2] startup failed due to previous errors
157 六月 29, 2015 3:08:21 下午 org.apache.coyote.http11.Http11Protocol start
158 信息: Starting Coyote HTTP/1.1 on http-8080
159 六月 29, 2015 3:08:21 下午 org.apache.jk.common.ChannelSocket init
160 信息: JK: ajp13 listening on /0.0.0.0:8009
161 六月 29, 2015 3:08:21 下午 org.apache.jk.server.JkMain start
162 信息: Jk running ID=0 time=0/36  config=null
163 六月 29, 2015 3:08:21 下午 org.apache.catalina.startup.Catalina start
164 信息: Server startup in 2853 ms

后来我在网上查找,发现是struts2.3.24运行起来,不仅需要几个基本的jar包,还需要javassist-3.11.0.GA.jar,我添加这个jar包到工程中,如下图:

然后再次运行这个struts2工程,然后发现报错发生了变化,如下图:

 1 六月 29, 2015 3:09:26 下午 org.apache.catalina.core.AprLifecycleListener init
 2 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\software\myeclipse\install\binary\com.sun.java.jdk7.win32.x86_1.7.0.u45\bin;D:\software\myeclipse\install\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_11.0.0.me201211151802\tomcat\bin
 3 六月 29, 2015 3:09:27 下午 org.apache.coyote.http11.Http11Protocol init
 4 信息: Initializing Coyote HTTP/1.1 on http-8080
 5 六月 29, 2015 3:09:27 下午 org.apache.catalina.startup.Catalina load
 6 信息: Initialization processed in 583 ms
 7 六月 29, 2015 3:09:27 下午 org.apache.catalina.core.StandardService start
 8 信息: Starting service Catalina
 9 六月 29, 2015 3:09:27 下午 org.apache.catalina.core.StandardEngine start
10 信息: Starting Servlet Engine: Apache Tomcat/6.0.13
11 六月 29, 2015 3:09:30 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
12 信息: Parsing configuration file [struts-default.xml]
13 六月 29, 2015 3:09:30 下午 org.apache.catalina.core.StandardContext filterStart
14 严重: Exception starting filter struts2
15 java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
16     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:213)
17     at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
18     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
19     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
20     at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
21     at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
22     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
23     at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
24     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
25     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
26     at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
27     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
28     at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
29     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
30     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
31     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
32     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
33     at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
34     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
35     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
36     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
37     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
38     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
39     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
40     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
41     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
42     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
43     at org.apache.catalina.core.StandardService.start(StandardService.java:516)
44     at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
45     at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
46     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
47     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
48     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
49     at java.lang.reflect.Method.invoke(Method.java:606)
50     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
51     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
52 Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
53     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
54     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
55     ... 36 more
56
57 六月 29, 2015 3:09:30 下午 org.apache.catalina.core.StandardContext start
58 严重: Error filterStart
59 六月 29, 2015 3:09:30 下午 org.apache.catalina.core.StandardContext start
60 严重: Context [/struts2] startup failed due to previous errors
61 六月 29, 2015 3:09:30 下午 org.apache.coyote.http11.Http11Protocol start
62 信息: Starting Coyote HTTP/1.1 on http-8080
63 六月 29, 2015 3:09:30 下午 org.apache.jk.common.ChannelSocket init
64 信息: JK: ajp13 listening on /0.0.0.0:8009
65 六月 29, 2015 3:09:30 下午 org.apache.jk.server.JkMain start
66 信息: Jk running ID=0 time=0/26  config=null
67 六月 29, 2015 3:09:30 下午 org.apache.catalina.startup.Catalina start
68 信息: Server startup in 3935 ms

对比上下两次报错,发现这个添加javassist-3.11.0.GA.jar,解决了:严重: Dispatcher initialization failed

但是还有一个错误没有解决,这个错误是:严重: Exception starting filter struts2

这里说明一下:Javassist是一个开源的分析、编辑和创建Java字节码的类库。是由东京工业大学的数学和计算机科学系的 Shigeru Chiba (千叶 滋)所创建的。它已加入了开放源代码JBoss 应用服务器项目,通过使用Javassist对字节码操作为JBoss实现动态AOP框架。

2.

Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils,网友根据这个报错的解读是,缺少添加的commons-lang3-3.1.jar,这个jar包是:

跟java.lang这个包的作用类似,Commons Lang这一组API也是提供一些基础的、通用的操作和处理,如自动生成toString()的结果、自动实现hashCode()和equals()方法、数组操作、枚举、日期和时间的处理等等。

这一组API的所有包名都以org.apache.commons.lang开头,共有如下8个包:

org.apache.commons.lang

org.apache.commons.lang.builder

org.apache.commons.lang.enum

org.apache.commons.lang.enums

org.apache.commons.lang.exception

org.apache.commons.lang.math

org.apache.commons.lang.mutable

org.apache.commons.lang.time

然后我添加这个jar包之后,再次运行这个struts工程,发现:

  1 六月 29, 2015 3:44:24 下午 org.apache.catalina.core.AprLifecycleListener init
  2 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\software\myeclipse\install\binary\com.sun.java.jdk7.win32.x86_1.7.0.u45\bin;D:\software\myeclipse\install\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_11.0.0.me201211151802\tomcat\bin
  3 六月 29, 2015 3:44:24 下午 org.apache.coyote.http11.Http11Protocol init
  4 信息: Initializing Coyote HTTP/1.1 on http-8080
  5 六月 29, 2015 3:44:24 下午 org.apache.catalina.startup.Catalina load
  6 信息: Initialization processed in 600 ms
  7 六月 29, 2015 3:44:24 下午 org.apache.catalina.core.StandardService start
  8 信息: Starting service Catalina
  9 六月 29, 2015 3:44:24 下午 org.apache.catalina.core.StandardEngine start
 10 信息: Starting Servlet Engine: Apache Tomcat/6.0.13
 11 六月 29, 2015 3:44:28 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 12 信息: Parsing configuration file [struts-default.xml]
 13 六月 29, 2015 3:44:29 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 14 信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
 15 六月 29, 2015 3:44:29 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 16 信息: Parsing configuration file [struts-plugin.xml]
 17 六月 29, 2015 3:44:29 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 18 信息: Parsing configuration file [struts.xml]
 19 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 20 信息: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory)
 21 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 22 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ActionFactory)
 23 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 24 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ResultFactory)
 25 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 26 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ConverterFactory)
 27 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 28 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.InterceptorFactory)
 29 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 30 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ValidatorFactory)
 31 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 32 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.UnknownHandlerFactory)
 33 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 34 信息: Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory)
 35 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 36 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
 37 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 38 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter)
 39 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 40 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter)
 41 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 42 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter)
 43 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 44 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter)
 45 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 46 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter)
 47 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 48 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor)
 49 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 50 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor)
 51 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 52 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor)
 53 六月 29, 2015 3:44:29 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 54 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator)
 55 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 56 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder)
 57 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 58 信息: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
 59 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 60 信息: Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider)
 61 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 62 信息: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
 63 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 64 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
 65 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 66 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
 67 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 68 信息: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
 69 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 70 信息: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
 71 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 72 信息: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
 73 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 74 信息: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
 75 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 76 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
 77 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 78 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
 79 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 80 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
 81 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 82 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
 83 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 84 信息: Choosing bean (struts) for (org.apache.struts2.util.ContentTypeMatcher)
 85 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 86 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
 87 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 88 信息: Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
 89 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 90 信息: Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
 91 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 92 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
 93 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 94 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.DispatcherErrorHandler)
 95 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 96 信息: Choosing bean (struts) for (com.opensymphony.xwork2.security.ExcludedPatternsChecker)
 97 六月 29, 2015 3:44:30 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 98 信息: Choosing bean (struts) for (com.opensymphony.xwork2.security.AcceptedPatternsChecker)
 99 六月 29, 2015 3:44:35 下午 org.apache.coyote.http11.Http11Protocol start
100 信息: Starting Coyote HTTP/1.1 on http-8080
101 六月 29, 2015 3:44:35 下午 org.apache.jk.common.ChannelSocket init
102 信息: JK: ajp13 listening on /0.0.0.0:8009
103 六月 29, 2015 3:44:35 下午 org.apache.jk.server.JkMain start
104 信息: Jk running ID=0 time=0/40  config=null
105 六月 29, 2015 3:44:35 下午 org.apache.catalina.startup.Catalina start
106 信息: Server startup in 10530 ms
107 六月 29, 2015 3:44:37 下午 org.apache.struts2.dispatcher.Dispatcher warn
108 警告: Could not find action or result: /struts2/
109 There is no Action mapped for namespace [/] and action name [] associated with context path [/struts2]. - [unknown location]
110     at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
111     at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
112     at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
113     at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
114     at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:554)
115     at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
116     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
117     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
118     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
119     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
120     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
121     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
122     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
123     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
124     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
125     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
126     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
127     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
128     at java.lang.Thread.run(Thread.java:744)

到这里我们发现,没有发现报错了,说明问题成功解决了,这里同时也出现一个警告:

警告: Could not find action or result: /struts2/

我找了很久才发现这个是web.xml文件中:

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
 3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 5
 6     <filter>
 7         <filter-name>struts2</filter-name>
 8         <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
 9     </filter>
10
11     <filter-mapping>
12         <filter-name>struts2</filter-name>
13         <url-pattern>/*</url-pattern>
14     </filter-mapping>
15
16     <welcome-file-list>
17         <welcome-file>index.html</welcome-file>
18     </welcome-file-list>
19
20
21 </web-app>

这里index.html是错误的,因为工程下没有这个文件,如下图:

所以我改一下,改为:

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
 3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 5
 6     <filter>
 7         <filter-name>struts2</filter-name>
 8         <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
 9     </filter>
10
11     <filter-mapping>
12         <filter-name>struts2</filter-name>
13         <url-pattern>/*</url-pattern>
14     </filter-mapping>
15
16     <welcome-file-list>
17         <welcome-file>index.jsp</welcome-file>
18     </welcome-file-list>
19
20
21 </web-app>

虽然我这里struts2工程中struts.xml没有任何配置,但是还是可以运行的,这里我运行这个struts2工程,如下图:

Console:

  1 六月 29, 2015 4:04:07 下午 org.apache.catalina.core.AprLifecycleListener init
  2 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\software\myeclipse\install\binary\com.sun.java.jdk7.win32.x86_1.7.0.u45\bin;D:\software\myeclipse\install\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_11.0.0.me201211151802\tomcat\bin
  3 六月 29, 2015 4:04:07 下午 org.apache.coyote.http11.Http11Protocol init
  4 信息: Initializing Coyote HTTP/1.1 on http-8080
  5 六月 29, 2015 4:04:07 下午 org.apache.catalina.startup.Catalina load
  6 信息: Initialization processed in 570 ms
  7 六月 29, 2015 4:04:07 下午 org.apache.catalina.core.StandardService start
  8 信息: Starting service Catalina
  9 六月 29, 2015 4:04:07 下午 org.apache.catalina.core.StandardEngine start
 10 信息: Starting Servlet Engine: Apache Tomcat/6.0.13
 11 六月 29, 2015 4:04:11 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 12 信息: Parsing configuration file [struts-default.xml]
 13 六月 29, 2015 4:04:11 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 14 信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
 15 六月 29, 2015 4:04:11 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 16 信息: Parsing configuration file [struts-plugin.xml]
 17 六月 29, 2015 4:04:11 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
 18 信息: Parsing configuration file [struts.xml]
 19 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 20 信息: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory)
 21 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 22 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ActionFactory)
 23 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 24 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ResultFactory)
 25 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 26 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ConverterFactory)
 27 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 28 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.InterceptorFactory)
 29 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 30 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ValidatorFactory)
 31 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 32 信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.UnknownHandlerFactory)
 33 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 34 信息: Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory)
 35 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 36 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
 37 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 38 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter)
 39 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 40 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter)
 41 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 42 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter)
 43 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 44 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter)
 45 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 46 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter)
 47 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 48 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor)
 49 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 50 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor)
 51 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 52 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor)
 53 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 54 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator)
 55 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 56 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder)
 57 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 58 信息: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
 59 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 60 信息: Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider)
 61 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 62 信息: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
 63 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 64 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
 65 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 66 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
 67 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 68 信息: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
 69 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 70 信息: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
 71 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 72 信息: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
 73 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 74 信息: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
 75 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 76 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
 77 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 78 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
 79 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 80 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
 81 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 82 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
 83 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 84 信息: Choosing bean (struts) for (org.apache.struts2.util.ContentTypeMatcher)
 85 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 86 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
 87 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 88 信息: Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
 89 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 90 信息: Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
 91 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 92 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
 93 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 94 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.DispatcherErrorHandler)
 95 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 96 信息: Choosing bean (struts) for (com.opensymphony.xwork2.security.ExcludedPatternsChecker)
 97 六月 29, 2015 4:04:12 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
 98 信息: Choosing bean (struts) for (com.opensymphony.xwork2.security.AcceptedPatternsChecker)
 99 六月 29, 2015 4:04:16 下午 org.apache.coyote.http11.Http11Protocol start
100 信息: Starting Coyote HTTP/1.1 on http-8080
101 六月 29, 2015 4:04:16 下午 org.apache.jk.common.ChannelSocket init
102 信息: JK: ajp13 listening on /0.0.0.0:8009
103 六月 29, 2015 4:04:16 下午 org.apache.jk.server.JkMain start
104 信息: Jk running ID=0 time=0/65  config=null
105 六月 29, 2015 4:04:16 下午 org.apache.catalina.startup.Catalina start
106 信息: Server startup in 8766 ms

这里我们发现Console是很干净的,没有警告和错误。

下面这个是index.jsp展现图:

时间: 2024-11-03 22:24:51

struts2.1笔记06:struts2开发环境的搭建实际操作出现的问题的相关文章

使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境

做了三年多的JavaEE开发了,在平时的JavaEE开发中,为了能够用最快的速度开发项目,一般都会选择使用Struts2,SpringMVC,Spring,Hibernate,MyBatis这些开源框架来开发项目,而这些框架一般不是单独使用的,经常是Struts2+Spring3+Hibernate.SpringMVC+Spring+Hibernate.SpringMVC+Spring+Mybatis这几种组合中的一种,也就是多个框架配合起来使用.今天来总结一下如何使用Maven搭建Struts

android笔记1——开发环境的搭建

Long Long ago...已经成为了历史,我还是要说出一个真相:早年前,那时候,android还不被大众所认知的时候,当然开发者也没不像现在那样趋于饱和状态.一位大牛前辈,也是我的学长,那时候我还在上大学.前辈告诫我有时间得去看看android开发,那时候的自己,年轻.冲动.不畏惧,毅然地选择了java服务端开发,放弃了学习android开发. 时隔数年的今天,因为公司业务项目的发展,我还是得去做android开发工作...虽然这几年间断断续续的看了些android开发,但是将成为历史的今

开发环境——基于RHEL 6.8开发环境的搭建

开发环境--基于RHEL 6.8开发环境的搭建 本文讲述了基于RHEL 6.8操作系统搭建开发环境,主要安装了GCC 4.9.3.Qt 5.7.Apache 2.4.25.MySQL 5.6.35.本文同时适用于在Linux主机无互联网环境下搭建开发环境,只需要将所需安装包下载后拷贝到Linux主机即可. 一.RHEL6.8安装 1.RHEL 6.8下载 下载RHEL 6.8安装包:rhel-server-6.8-x86_64-dvd.iso 2.RHEL 6.8安装 安装过程中选择Develo

Android开发环境的搭建

(我果然在作死的道路上越走越远了...) 花了一下午的时间搭建了Anroid开发环境,来说说搭建的过程: 首先,百度! 网上关于Android开发环境搭建的教程有很多,但许多都很杂乱,而且时间久远已经不是很准确了. 浏览了众多教程,贴两个个人觉得较不错的教程地址: 1.http://blog.csdn.net/fl_xin/article/details/39472019 2.http://wenku.baidu.com/link?url=noSH3FDTfaZRe59RTFtuemi-6155

Ubuntu 14.04下java开发环境的搭建--3--Tomcat及MySQL的安装

前面两篇文章,已经说明了JDK和Eclipse 的安装方法,下面简单说一下,Tomcat及MySQL的安装方法. Tomcat的安装. 在合适的地方解压apache-tomcat-6.0.39.tar.gz cd /opt/DevelopTools sudo mkdir server cd server sudo cp /home/home/下载/apache-tomcat-6.0.39.tar.gz /opt/DevelopTools/server sudo tar -zxvf apache-

从svn签下代码以及集成开发环境的搭建详细过程

在经过几次的从svn上签下来代码的经历之后,终于总结出了详细的步骤 在upupw/htdocs下建立新的文件夹(此处根据你服务器的根目录而变),此处为bpb1027 ,再右键,选择SVN Checkout 填入内网或外网访问SVN的地址,后面要加个/trunk(主干开发) SVN 主干(trunk).分支(branch ).标记(tag)的不同 trunk:是用来做主方向开发的,一个新模块的开发,这个时候就放在trunk,当模块开发完成后,需要修改,就用branch. branch:是用来做并行

Perl开发环境的搭建--windows

Steps Summary: 1. 下载安装文件 2. 点击文件进行安装 3. 设置环境变量 4. 测试安装是否成功 以在win8上安装Active perl 5.22 为例 Details: 1. 下载安装文件 1) way1: 自己安装编译器,再安装Perl模块,再进行编译,安装. 这种方法的好处是可以编译安装所有的模块 2) way2: 下载已经编译好的perl模块直接进行安装 只能安装定义好的模块.但是编译好的模块一般包含了日常所需的功能.初学者最好使用第二种方法进行安装 以active

Linux平台下Java_Android开发环境的搭建

Linux 平台下安装JDK .Eclipse .Android SDK 说明 开发工具需自行去下载,此处就不再累述 该教程安装环境为 Ubuntu 14.04 x64 其他Linux操作方式基本相同 设计文件修改部分,请先备份要修改的文件,避免操作失误导致不能还原 Liunx 平台下区分大小写,输入文件名或路径建议复制避免不必要的错误 部分操作涉及root权限,为了避免麻烦 请直接使用 root权限操作 开启root权限: 1. sudo su root 2. 后面的提示中输入用户密码 安装

【2014】【辛星】【php】【秋季】【1】php开发环境的搭建

**************************什么是开发环境*********************** 1.我们学习PHP,是使用它来做web用的,通俗理解,就是做网站. 2.网站的运行需要一定的条件,比如它需要服务器.数据库等环境,当然还需要一个操作系统来支撑他们的运行. 3.我们在学习阶段,就需要模拟这个网站的运行环境,但是我们是在开发阶段,也就是所谓的"开发环境". *****************搭建环境前的选择***************************