预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

HYPERLINK"http://www.wangaobuy.com/index.php"万高石材HYPERLINK"http://www.diypz.com"电脑diyHYPERLINK"http://www.xideni.com/category-2-b0.html"石材背景墙 struts2入门手册 首先这个教程是基于你已经安装了myeclipse的基础上的,如果你还没有安装myeclipse工具软件的话,你需要马上去安装一个。 如果你已经有了工具软件了的话,现在就按照以下步骤来入门struts2吧。 下载struts2 进入struts的官网http://struts.apache.org/,点击download,选择FullDistrybution:下的struts2-xxx-all.zip,下载struts2的最新版本,将压缩包解压,放置到D盘目录下。 解压struts2 进入你解压后的struts2文件夹中,到D:\struts2-xxx\apps中,解压其中的struts2-blank.war压缩文件到D:\struts2-xxx\example,这是struts2提供的基础例子,里面的WEB-INF\lib目录下的包正是struts2正常工作所需要的基本包。 导入struts2基本包 打开你的myeclipse,创建一个webproject工程,命名为test(你也可以自己随意起一个),不要急着点击Finish,先选择Next>,继续选择Next>,在弹出的对话框中把第二个单选框打勾,如图, 再点击Finish。创建好之后在你创建的工程上目录下的WebRoot/WEB-INF/lib目录上单击右键,选择import..., 选择General下的FileSystem,点击Next>,选择Browse...,浏览选择到D:\struts\example\WEB-INF\lib目录,点击确定。选择SellctAll,点击Finish, 就完成了struts需要的最基础的核心包的导入。 用struts实现一个简单的登陆验证 修改工程目录下的WebRoot\WEB-INF目录下的web.xml文件,将里面的内容替换为如下代码: <?xmlversion="1.0"encoding="UTF-8"?> <web-appxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://java.sun.com/xml/ns/javaee"xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"id="WebApp_ID"version="3.0"> <display-name>test</display-name> <!--设置初始页面的URL--> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> <!--设置struts过滤器--> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> 在工程的src目录下创建struts.xml,代码如下: <?xmlversion="1.0"encoding="UTF-8"?> <!DOCTYPEstrutsPUBLIC "-//ApacheSoftwareFoundation//DTDStrutsConfiguration2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <!--是否开启动态方法调用--> <constantname="struts.enable.DynamicMethodInvocation"value="false"/> <!--指定被struts2处理的请求的后缀类型,多个用逗号隔开--> <constantname="struts.action.exten