Today began to contact STRUTS2, completed the application of a large pile of error, in fact, "project", "right button", "Build Path", "Configure Build Path" to change the corresponding configuration will be able to correct all errors. Many errors can be corrected by online search. Correcting these errors also helps you to better understand some of the configuration of developing strut2.
After all the errors have been resolved, starting the Tomcat server webpage always gets an error. At this point you can go to the console for some information, you will find the following error:
Severity: Exception starting filter struts2java.lang.NoClassDefFoundError:org/apache/commons/lang3/StringUtils at Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register ( Xmlconfigurationprovider.java:211) at Org.apache.struts2.config.StrutsXmlConfigurationProvider.register (Strutsxmlconfigurationprovider.java: 102) at Com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer (Defaultconfiguration.java: 234) at Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (Configurationmanager.java: the) at Org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (Dispatcher.java:445) at Org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:489) at Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (Initoperations.java: About) at Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( Strutsprepareandexecutefilter.java: $) at Org.apache.catalina.core.ApplicationFilterConfig.initFilter (Applicationfilterconfig.java:279) at Org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicationfilterconfig.java:260) at Org.apache.catalina.core.ApplicationFilterConfig.<init> (Applicationfilterconfig.java: the) at Org.apache.catalina.core.StandardContext.filterStart (Standardcontext.java:4594) at Org.apache.catalina.core.StandardContext.startInternal (Standardcontext.java:5201) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java: Max) at Org.apache.catalina.core.containerbase$startchild.call (Containerbase.java:1408) at Org.apache.catalina.core.containerbase$startchild.call (Containerbase.java:1398) at Java.util.concurrent.FutureTask.run (Futuretask.java:266) at Java.util.concurrent.ThreadPoolExecutor.runWorker (Threadpoolexecutor.java:1142) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:617) at Java.lang.Thread.run (Thread.java:745) caused by:java.lang.ClassNotFoundException:org.apache.commons.lang3.StringUtils at Org.apache.catalina.loader.WebappClassLoader.loadClass (Webappclassloader.java:1320) at Org.apache.catalina.loader.WebappClassLoader.loadClass (Webappclassloader.java:1173) ... -More
I used the struts-2.3 version of the library, when I imported some common libraries in the project, as follows:
Obviously, the error is due to the lack of libraries, I found the corresponding library Commons-lang3-3.1.jar in the Struts2 file, and then import, OK.
Start Tomcat error in Eclipse (Struts2 app development)