** Web.xml配置**

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<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>

struts2配置(必须放在SRC下面)

<?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>
<package name="demo1" extends="struts-default" >
<action name="aaaaaaa" class="com.war.demo.hello" method="demo">
<result name="aa">/hello.jsp</result>
</action>
</package>
</struts>

Struts2配置。的更多相关文章

  1. [SSH 2] 以网站主页面浅谈Struts2配置

    导读:前面总体的介绍了一下SSH框架,那么作为Struts这一支,具体是怎么配置的呢?本篇博客则主要是以自己做过的实例中的登录一条线,简单介绍一下struts2的配置,如有不妥之处,还请大家多提点提点 ...

  2. MyEclipse下Struts2配置使用和Ajax、JSON的配合

    原创文章,转载请注明:MyEclipse下Struts2配置使用和Ajax.JSON的配合  By Lucio.Yang 新手,初学Struts2的配置,同时尝试与Ajax通过JSON交互.首先介绍M ...

  3. web09 struts2配置 struts2入门

    电影网站:www.aikan66.com 项目网站:www.aikan66.com游戏网站:www.aikan66.com图片网站:www.aikan66.com书籍网站:www.aikan66.co ...

  4. web 08 struts2入门 struts2配置 struts包

    电影网站:www.aikan66.com 项目网站:www.aikan66.com游戏网站:www.aikan66.com图片网站:www.aikan66.com书籍网站:www.aikan66.co ...

  5. STRUTS2配置动态页面

      STRUTS2配置动态页面 CreateTime--2017年5月11日09:00:31Author:Marydon 1.struts配置 <?xml version="1.0&q ...

  6. 【SSH2(理论篇)】--Struts2配置具体解释

    上篇博客讨论了SSH2框架模型,在开发过程中发现SSH2的开发模型事实上类似于经典的三层模式,在每一层中分别加入了不同的框架,显示层使用的是Struts2进行配置的,业务逻辑层使用的是Spring配置 ...

  7. Struts2配置Result(Struts2_result)

    一.概要 二.常用四种类型的配置 Struts.xml <?xml version="1.0" encoding="UTF-8" ?> <!D ...

  8. struts2 配置拦截器

    第一步:继承MethodFilterInterceptor写自己的自定义拦截器 import org.apache.struts2.ServletActionContext; import com.o ...

  9. struts2配置详解

    01.Struts 2基本结构 使用Struts2框架实现用登录的功能,使用struts2标签和ognl表达式简化了试图的开发,并且利用struts2提供的特性对输入的数据进行验证,以及访问Servl ...

随机推荐

  1. react生命周期-新增与替换

    class A extends React.Component { // 用于初始化 state constructor() {} // 用于替换 `componentWillReceiveProps ...

  2. C#使用RSA证书文件加密和解密

    public class EncrypHelp { static public byte[] RSAEncrypt(byte[] DataToEncrypt, RSAParameters RSAKey ...

  3. ZedBoard前期准备工作

    1. 资源下载 内核:https://github.com/Xilinx/linux-xlnx/releases uboot:https://github.com/Xilinx/u-boot-xlnx ...

  4. 设置position(absolute,fixed)导致flex布局不生效

    个人解决办法:将要设置display:flex的dom外面在套一个div,并且设置宽度,就可以了.

  5. MySql数据库通过idb和frm恢复

    简单粗暴 恢复user表 1.先建立和之前user表一样的表结构.就是执行create table user .... ,执行完,数据库目录下就会建立user.ibd文件(当然还有其他的) 2.执行 ...

  6. js 调用后台,后台调用js

    <html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat=" ...

  7. JavaScript中的获取元素的方法

    通过id获取元素 document.getElementById(id名字) 通过标签获取元素 document/元素.getElementsByTagName(标签名) 通过css选择器获取元素 d ...

  8. Centos 配置mailx使用外部smtp发送邮件

    安装mailx yum install mailx 配置mailx 笔者推荐163邮箱,当然,QQ邮箱也是可以的,PS:记得要进邮箱打开SMTP vi /etc/mail.rc //如果不存在,则编辑 ...

  9. 【持续更新】JAVA面向对象多线程编程的一些tips

    sleep()和wait()的区别 sleep()方法是Thread类的方法,wait()方法是Object类的方法. 调用sleep()方法的过程中,线程不会释放对象锁,睡眠时间一过,就又开始执行. ...

  10. const修饰指针+volatile +restrict

    const这块的难点 const修饰指针有以下的几种形式 ,不同的形式 它的意义不一样. 形式1: int a=23: const int *p=&a: a是int型,&a是int * ...