Cocould not open file xwork. xml

Source: Internet
Author: User

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:
----- 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.