深入理解Struts:实战框架设计与开发

5星 · 超过95%的资源 需积分: 14 1 下载量 52 浏览量 更新于2024-07-26 收藏 3.79MB PDF 举报
"Struts in Action中文版-实战STRUTS" 《Struts in Action》是一本关于实战Struts框架的书籍,旨在帮助读者深入理解并掌握如何使用Struts来构建Java Web应用程序。该书分为四个主要部分: 第一部分:Struts起步 - 第1章介绍了本书的目的、应用程序框架的概念、必备知识以及Struts框架的基本概述,让读者对Struts有一个初步的认识。 - 第2章探讨了Struts体系结构,解释了为什么需要框架,Struts与Model 2和MVC模式的关系,以及其控制流和优缺点。 - 第3章通过构建一个简单的登录应用程序,让读者实践Struts的基础知识,了解其工作原理。 - 第4章详细讲解了Struts的配置,包括XML文件、部署描述符、Struts配置元素、资源文件、Ant构建文件,以及如何配置Struts的Tiles和Validator组件。 第二部分:提出自己的框架结构 - 第5章专注于ActionForm的处理,解释了如何将用户输入转换为可处理的数据,ActionForm的不同类型及其使用场景。 - 第6章介绍了ActionForward对象,说明了它的功能、工作方式,以及如何进行转发和动态转发。 - 第7章详细阐述了ActionMapping的设计,包括其属性和内部组件,还指导读者如何编写自定义的ActionMapping。 - 第8章讲解了Action对象的使用,包括标准Action、级联Action、Scaffold Action等,以及如何实现灵活的转发。 第三部分:构造自己的页面 - 第10章讨论了如何使用Struts标签显示动态内容,涵盖了标准和扩展标签库的使用。 - 第11章介绍了Tiles框架,展示了如何利用Tiles来管理页面布局和创建复杂的页面结构。 - 第12章探讨了用户输入的验证,介绍了Struts Validator的使用,包括基本校验器、资源包、配置文件和本地化校验。 - 第13章讲述了内容本地化,即应用程序的国际化支持,包括Struts的国际化组件和本地化配置。 第四部分:以实例介绍Struts - 第15章和第16章通过Artimus和Redux这两个实例,展示了如何在实际项目中应用Struts,并介绍了从Struts 1.0升级到1.1的过程。 - 第17章讨论了使用Velocity模板引擎替换JSP,以及如何在Struts项目中集成Velocity。 附录提供了设计模式、Struts配置文件的API参考和标签库快速参考,为读者提供了额外的学习资源。 通过这本书,读者将能够深入了解Struts框架的工作机制,学会如何有效地配置和扩展Struts,以及如何利用它来构建高效、可维护的Java Web应用程序。

我用Spring5的aop应用时报这个错误Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [D:\ecliple\web5\WEB-INF\applicationContext.xml]; nested exception is java.nio.file.NoSuchFileException: WEB-INF\applicationContext.xml,他说我的applicationContext.xml文件不存在,可是我明明有这个文件,另外我的web.xml需要更改吗<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <context-param> <param-name>contextConfigLocation </param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <display-name>Struts2</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate5.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/* </url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app>

2023-05-30 上传

192.168.85.1 - - [26/Jun/2022:06:07:07 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 24 192.168.85.1 - - [26/Jun/2022:06:07:11 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 24 192.168.85.1 - - [26/Jun/2022:06:07:11 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 24 192.168.85.1 - - [26/Jun/2022:06:07:11 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 200 12925 192.168.85.1 - - [26/Jun/2022:06:07:11 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 200 12925 192.168.85.1 - - [26/Jun/2022:06:07:11 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 200 12925 192.168.85.1 - - [26/Jun/2022:06:07:11 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 200 14 192.168.85.1 - - [26/Jun/2022:06:08:06 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 15 192.168.85.1 - - [26/Jun/2022:06:08:16 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 1227 192.168.85.1 - - [26/Jun/2022:06:10:15 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 79 192.168.85.1 - - [26/Jun/2022:06:13:25 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 404 752 192.168.85.1 - - [26/Jun/2022:06:16:42 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 35 192.168.85.1 - - [26/Jun/2022:06:16:57 -0400] "GET //struts2-showcase/hhh.jsp HTTP/1.1" 403 642 192.168.85.1 - - [26/Jun/2022:06:18:55 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 35 192.168.85.1 - - [26/Jun/2022:06:19:02 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 35 192.168.85.1 - - [26/Jun/2022:06:19:09 -0400] "GET //struts2-showcase/hhh1.jsp HTTP/1.1" 403 642 192.168.85.1 - - [26/Jun/2022:06:19:34 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 400 192.168.85.1 - - [26/Jun/2022:06:20:37 -0400] "POST /struts2-showcase/index.action HTTP/1.1" 500 5 192.168.85.1 - - [26/Jun/2022:06:20:42 -0400] "GET //struts2-showcase/hhh1.jsp HTTP/1.1" 403 642 192.168.85.1 - - [26/Jun/2022:06:20:46 -0400] "GET //struts2-showcase/hhh.jsp HTTP/1.1" 403 642 192.168.85.1 - - [26/Jun/2022:06:20:51 -0400] "GET /struts2-showcase/hhh.jsp HTTP/1.1" 403 642

2023-07-12 上传