strcut2学习之路(struct的配置)
来源:互联网 发布:佛山网站seo推广 编辑:程序博客网 时间:2024/06/11 17:28
strcut2是一个流行的web应用框架,首先,我们在eclipse上面进行struct2的配置
1.先到struct2的官网下载相应的jar包(http://struts.apache.org/)
2.在eclipse中新建一个web项目,引入相应的jar包
3. jar包必须要引入的有六个
struct2-core-2.x.x.jar struct2框架的核心jar包
xwork-2.x.x.jar XWork类库,struct2在其基础上创建
ognl-2.x.x.jar 对象图像导航,strcut2通过其读取对象
freemarker-2-x.x.jar struct2 UI标签的模板使用
commons-logging-1.x.x.jar 日志
commons-fileupload-1.x.x.jar 文件上传组件
4将jar包加入classpath,并对struct2.xml配置文件进行配置
strcuts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
</struts>
5.配置web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
这样,struct2的开发环境就搭建完成了
- strcut2学习之路(struct的配置)
- strcut2学习
- c++学习之struct
- golang学习之--struct类型
- swift简单学习之Struct
- Golang 学习之路七:数据(Array、Slice、Map、Struct)
- 菜鸟学习之路------学习DNS的配置(LINUX)
- C#学习日记09---数据类型 之 结构(Struct)类型
- 【xv6学习之番外篇】详解struct Env 与 struct Trapframe
- Python的struct模块学习
- Struct配置
- 我的Linux学习之路(二、配置网络)
- Hibernate的学习之路四(核心配置扩展)
- Hibernate的学习之路五(核心可选配置)
- Hibernate的学习之路六(加载配置)
- C语言学习之结构体struct
- C++学习之旅-结构struct
- go语言学习之struct初认识
- Debugging Lua Project created in Cocos Code IDE creates “Waiting for debugger to connect” in Win-7
- Leetcode Remove Duplicates from Sorted Array
- shell script基础编程
- 自定义jquery插件(二)--------细节掌握
- linux上编译C
- strcut2学习之路(struct的配置)
- iOS开发-自定义后台显示图片
- Hadoop笔记之core-site.xml && hdfs-site.xml&&mapred-site.xml分析&&hadoop等集群环境搭建梳理
- 15、用户管理
- Adobe Flash Player 本地播放器
- 9月份英语总结,persistent。
- Spinner的setOnItemSelectedListener不起作用
- switch语句的小应用……
- ztree (一)----初体验