I wrote a very simple webwork entry project, and the Login logon module encountered an error:
Com. opensymphony. xwork. config. ConfigurationException: Error loading configuration file xwork. xml
With nested exception
Com. opensymphony. xwork. config. ConfigurationException: Caught exception while loading file xwork. xml
With nested exception
Java. lang. Exception: cocould not open file xwork. xml
Com. opensymphony. xwork. config. providers. XmlConfigurationProvider. init (XmlConfigurationProvider. java: 127)
Com. opensymphony. xwork. config. impl. DefaultConfiguration. reload (DefaultConfiguration. java: 85)
Com. opensymphony. xwork. config. ConfigurationManager. getConfiguration (ConfigurationManager. java: 56)
Com. opensymphony. xwork. DefaultActionProxyFactory. setupConfigIfActionIsCommand (defaactionactionproxyfactory. java: 58)
Com. opensymphony. xwork. defaultactionproxyfactory. createactionproxy (defaactionactionproxyfactory. Java: 43)
Com. opensymphony. webwork. Dispatcher. servletdispatcher. serviceaction (servletdispatcher. Java: 270)
Com. opensymphony. webwork. Dispatcher. servletdispatcher. Service (servletdispatcher. Java: 237)
Javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)
The cause of the error is obvious: the xwork. xml file is not found. Although xwork. xml already exists in the source file of the project
Search, there is still no answer (haha, indeed depressed), found that the need to put webwork. properties is placed under the src directory. finally, an error was found in the running file, that is, Tomcat-webapp-projectname -- webroot-web-INF-does not have xwork. XML, copy the source file, and finally succeeded. I used to write struts, hibernate, spring
It is dependent on the development environment, and now it has finally suffered losses. However, I have made some progress and recorded it.
A typical webwork WEB Project Development Directory:
Projectname
----- SRC
-------------- Com. jobs002.webwork. Action
-------------- Webwork. properties
-- WebRoot
--------------- METE-INF
--------------- Web-INF
----- Web. xml
------ Lib
------------------ Webwork2.17.jar and other packages (you need to copy the package to this place)
------------------ Xwork. xml
------------------ Index. jsp