myeclipse9 struts2配置
引用struts2所用到的jar
web.xml配置如下
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list> </web-app>
struts.xml 位置:放到src根目录下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="test" extends="struts-default">
<action name="aa" class="test.tt" method="getimage">
<result name="ss">/index.jsp</result>
</action>
<action name="bb" class="test.tt" method="getimage2">
</action>
</package> </struts>
applicationContext.xml 放到WEB-INF目录上
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> </beans>
myeclipse9 struts2配置的更多相关文章
- [SSH 2] 以网站主页面浅谈Struts2配置
导读:前面总体的介绍了一下SSH框架,那么作为Struts这一支,具体是怎么配置的呢?本篇博客则主要是以自己做过的实例中的登录一条线,简单介绍一下struts2的配置,如有不妥之处,还请大家多提点提点 ...
- MyEclipse下Struts2配置使用和Ajax、JSON的配合
原创文章,转载请注明:MyEclipse下Struts2配置使用和Ajax.JSON的配合 By Lucio.Yang 新手,初学Struts2的配置,同时尝试与Ajax通过JSON交互.首先介绍M ...
- Struts2配置。
** Web.xml配置** <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns=&q ...
- web09 struts2配置 struts2入门
电影网站:www.aikan66.com 项目网站:www.aikan66.com游戏网站:www.aikan66.com图片网站:www.aikan66.com书籍网站:www.aikan66.co ...
- web 08 struts2入门 struts2配置 struts包
电影网站:www.aikan66.com 项目网站:www.aikan66.com游戏网站:www.aikan66.com图片网站:www.aikan66.com书籍网站:www.aikan66.co ...
- STRUTS2配置动态页面
STRUTS2配置动态页面 CreateTime--2017年5月11日09:00:31Author:Marydon 1.struts配置 <?xml version="1.0&q ...
- 【SSH2(理论篇)】--Struts2配置具体解释
上篇博客讨论了SSH2框架模型,在开发过程中发现SSH2的开发模型事实上类似于经典的三层模式,在每一层中分别加入了不同的框架,显示层使用的是Struts2进行配置的,业务逻辑层使用的是Spring配置 ...
- Struts2配置Result(Struts2_result)
一.概要 二.常用四种类型的配置 Struts.xml <?xml version="1.0" encoding="UTF-8" ?> <!D ...
- struts2 配置拦截器
第一步:继承MethodFilterInterceptor写自己的自定义拦截器 import org.apache.struts2.ServletActionContext; import com.o ...
随机推荐
- ActiveMQ和Tomcat的整合应用(转)
转自:http://topmanopensource.iteye.com/blog/1111321 ActiveMQ和Tomcat的整合应用 博客分类: ActiveMQ学习和研究 在Active ...
- UNIX网络编程——网络IPC:套接字
UNIX网络编程——网络IPC:套接字 Contents 套接字接口 套接字描述符 寻址 字节序 地址格式 地址查询 绑定地址 建立连接 数据传输 套接字选项 带外数据 UNIX域套接字 使用套接字的 ...
- gdb与adb相关命令总结
在使用gdb与adb时需要注意一些类似于权限的问题,比如设备需要root,设备root后命令行下需要 切换用户到root用户下操作,又比如相关的目录或文件是否有足够的权限等等,总结为如下: (以下示例 ...
- JSP页面的构成
JSP页面就是带有JSP元素的常规Web页面,它由静态内容和动态内容构成.其中,静态内容指HTML元素,动态内容(JSP元素)包括指令元素.脚本元素.动作元素.注释等内容. 1.指令元素 指令 ...
- B/S和C/S的区别
B/S 指的是 Browser/Server : C/S 指的是Client/Server 区别: 1. B/S最大优势为客户端免维护,适用于用户群庞大,或客户需求经长发生变化的情况. C/S功能强大 ...
- ElasticSearch安装部署
官网:http://www.elasticsearch.org ElasticSearch is an open-source and distributed search engine which ...
- Android HTTPS(2)HttpURLConnection.getInputStream异常的原因及解决方案
Common Problems Verifying Server Certificates InputStream in = urlConnection.getInputStream(); getIn ...
- leetcode:Excel Sheet Column Number
Given a column title as appear in an Excel sheet, return its corresponding column number. For exampl ...
- 《OD大数据实战》MapReduce实战
一.github使用手册 1. 我也用github(2)——关联本地工程到github 2. Git错误non-fast-forward后的冲突解决 3. Git中从远程的分支获取最新的版本到本地 4 ...
- Hadoop集群(第10期副刊)_常用MySQL数据库命令
1.系统管理 1.1 连接MySQL 格式: mysql -h主机地址 -u用户名 -p用户密码 举例: 例1:连接到本机上的MySQL. 首先在打开DOS窗口,然后进入目录 mysqlbin,再键入 ...