如果遵循Struts2文档教程Simple Setup一节的方法对Strust2的架构进行从头构建的话,那么在接下来的Hello World一节中构建的网站部署到Tomcat6上后将无法启动。原因是Simple Setup一节中说明的需要的库文件有:
The following files are a minium requirement for your application.
Filename | Description |
---|---|
struts2-core.jar | Framework library itself, found in distribution root directory |
xwork.jar | XWork 2 library on which Struts 2 is built (version 2.0 or later) |
ognl.jar | Object Graph Navigation Language (OGNL), the expression language used throughout the framework |
freemarker.jar | All UI tag templates are written in Freemarker (also a good option for your own views) |
commons-logging.jar | Commons logging, which the framework uses to support transparently logging to either Log4J or JDK 1.4+ |
web.xml | Java web application configuration file that defines the filters (and other components) for your web application |
struts.xml | Framework configuration file that defines the actions, results, and interceptors for your application |
但是实际上还需要commons-fileupload.jar,加入该库就能解决Hello World项目不能启动的问题。