下载此文档

struts2 从头到尾(精).doc


文档分类:IT计算机 | 页数:约71页 举报非法文档有奖
1/71
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/71 下载此文档
文档列表 文档介绍
一: Struts2 入门: 视图: jsp () 控制器: StrutsPrepareAndExecuteFilter ,在 (过滤器)中。模型: action(LoginAction) 那个 FilterDispatche r是 struts 1的, struts 2的是StrutsPrepareAndExecuteFilter 在这里, 我不知道的是如何实例化的, 给实例化的? Index. jsp <%@ page language ="java" import =".*" pageEncoding ="UTF-8" %> <% String path =(); String basePath = ()+ "://" +()+ ":" +req ()+path+ "/" ; %> <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Transitional//EN" > <html ><head ><base href ="<%= basePath %> "> <title >My JSP '' starting page </ title > </ head ><body ><form action ="" > <input type ="text" name ="username" > <input type ="submit" name ="submit" > </ form ></ body ></ html > W <? xml version ="" encoding ="UTF-8" ?> <web-app version ="" xmlns ="http://java./xml/ns/javaee" xmlns:xsi ="1/XMLSchema-instance" xsi:schemaLocation ="http://java./xml/ns/javaee http://java./xml/ns/javaee/web-" > <filter ><filter-name >struts2 </ filter-name > <filter-class > utsPrepareAndExecuteFilter </ filter-class > </ filter ><filter-mapping ><filter-name >struts2 </ filter-name > <url-pattern >/* </ url-pattern > </ filter-mapping > <e-file-list > <e-file > </ e-file > </ e-file-list > </ web-app >S <? xml version ="" encoding ="UTF-8" ?> <! DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration //EN" "http://struts./dtds/struts-" > <struts ><package name ="struts2" extends ="struts-default" > <action name ="loginaction" class ="" > <result name ="ess" >/ </ result > </ action ></ package ></ struts > LoginAction .; .; public class LoginAction extends ActionSupport { private String username ; public String password ; public String getUsername() { return username ; } pu

struts2 从头到尾(精) 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数71
  • 收藏数0 收藏
  • 顶次数0
  • 上传人2768573384
  • 文件大小0 KB
  • 时间2016-07-01