SUV
struts 2(《java高级框架应用开发SSH》第一部分:Struts2)

全书分三大块,第一部分从第1章到第6章讲述Struts2,第二部分从第7章到第9章讲述Hibernate,第三部分从第10章到12章讲述Spring。


第一章:Struts+Spring+Hibernate概述

大部分Web应用分4层,表示层用Struts,业务层用Spring,持久层用Hibernate,域模块可以划分到业务层,用Spring框架。

第三章:Struts基础

Struts2核心配置文件是Struts.xml,请求和处理器映射,通过action标签来配置,

<action name="login"  class="com.ck.action.LoginAction">

(1)浏览器发送请求,如login.action。

(3)WebWork的拦截器链自动对请求应用通用功能,如验证、工作流或文件上传等。

(5)Action的excute方法处理结果信息将被输出到浏览器中,可以是HTML页面、图像或Pdf文件等。Struts2支持的视图技术非常多,既支持JSP、也支持velocity、FreeMarker等模板技术。

要使用Filter Dispatcher,需要在web.xml中配置Filter Dispatcher控制器。

Action需要继承ActionSupport,实现execute方法。

public class LoginAction extends  ActionSupport {     public String execute() throws Exception{              //TODO         return " login";     }}

第四章:Struts2标签

if、elseif、else;iterator;sort;date;il8n;include;param;property;set;text;url。

doubleselect;optiontransferselect;actionerror;actionmessage;fielderror。

5.1国际化支持、5.2 Struts2异常处理、5.3转换器、5.4数据验证

第六章:Struts拦截器和文件上传

6.2文件上传

#ssh##程序员#


顶一下()     踩一下()

热门推荐

发表评论
0评