1.引入相关struts2 jar包

2.web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>Struts2Demo</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list> <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>

3.struts.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.i18n.encoding" value="utf-8"></constant>
<package name="student" extends="struts-default">
<action name="listStudent" class="com.epoint.action.ListStudent" method="toList">
<result name="toList">/index.jsp</result>
</action>
......
</package>
</struts>

Struts2 环境搭建的更多相关文章

  1. 最新版ssh hibernate spring struts2环境搭建

    最新版ssh hibernate spring struts2环境搭建 最新版spring Framework下载地址:spring4.0.0RELEASE环境搭建 http://repo.sprin ...

  2. 第3章 Struts2框架--1、Struts2环境搭建

    第3章 Struts2框架--1.Struts2环境搭建 搭建步骤: 1.从下载http://struts.apache.org 没找到Struts2.3.16版,就下载了2.3.29 2.拷贝后解压 ...

  3. 【SSH】 之 Struts2环境搭建及简单应用开发

    在上一篇文章中,我们一起了解了一下struts2的工作机制原理,接下来让我们进行一下简单应用的开发 (一)配置环境 1.建立web项目 2.导入jar包 其中struts2中有很多jar包,我们不需要 ...

  4. struts2环境搭建和第一个程序

    环境搭建 项目目录 导入依赖jar包,如上图lib目录所示. 不同的版本可能会不一样,没关系在tomcat启动时,如果报错java.lang.ClassNotFoundException,我们可以按照 ...

  5. Struts2环境搭建及实例解析

    与struts1框架的使用一样,struts2的环境搭建及使用同样分为以下几个步骤: 1.      引入jar包(这里以struts2.2.3为例),所需jar包有以下几个: a)        s ...

  6. 【Struts 2】Struts2环境搭建

    一.关键步骤 1.创建Java Web项目 2.引入Struts2的依赖包,将依赖包拷贝到WEB-INF/lib下 * commons-logging-1.0.4.jar * freemarker-2 ...

  7. spring4+hibernate4+struts2环境搭建

    tomact配置请查看下面的文章 javaEE_maven_struts2_tomcat_first http://www.cnblogs.com/luotuoke/p/4543686.html po ...

  8. Struts2环境搭建

    1,从http://struts.apache.org  官网下载struts2的源码,最新的源码是2.5版本的,但是考虑到网上2.3版本的教程比较多,所以我下载了一个2.3版本的struts. 2, ...

  9. Struts2环境搭建和运用

    一.解压\struts-2.3.31\apps路径下struts2-blank.rar文件.将其中WEB-INFl路径下的lib中的包和web.xml文件复制到新项目中的WEB-INF路径下.web. ...

随机推荐

  1. Spring Boot + Spring Cloud 实现权限管理系统 配置中心(Config、Bus)

    技术背景 如今微服务架构盛行,在分布式系统中,项目日益庞大,子项目日益增多,每个项目都散落着各种配置文件,且随着服务的增加而不断增多.此时,往往某一个基础服务信息变更,都会导致一系列服务的更新和重启, ...

  2. mariadb安装和一些sql基础

    MariaDB安装    yum -y install mariadb mariadb-server 启动    systemctl start mariadb     systemctl enabl ...

  3. 一个简易的allocator

    #include <vector> #include <iostream> #include <algorithm> using namespace::std; t ...

  4. 调用 LoadLibraryEx 失败,在 ISAPI 筛选器 "C:\Program Files\php\php5isapi.dll"

    把 ISAPI 筛选器这里的php配置删掉,php改用fastcgi配置

  5. 【leetcode】429. N-ary Tree Level Order Traversal

    problem 429. N-ary Tree Level Order Traversal solution1:Iteration /* // Definition for a Node. class ...

  6. STL:unique()函数

    unique() unique()是剔除重复他是剔除相邻之间字符重复的,倘若其中中的字符前后之间是没有重复的,unique函数是起不到作用的,所以使用以前都会sort处理. unique()函数的返回 ...

  7. [CF1041F Ray in the tube][数学]

    http://codeforces.com/contest/1041/problem/F 题目大意: 下边界有n个给定点,上边界有m个给定点,可以从任意一个点发出一条激光,激光碰到边界会反射 激光到达 ...

  8. QMD ST表 倍增

    #include<iostream> #include<cmath> using namespace std; ; int a[maxn]; ]; ]; int quick(i ...

  9. 学习笔记TF040:多GPU并行

    TensorFlow并行,模型并行,数据并行.模型并行根据不同模型设计不同并行方式,模型不同计算节点放在不同硬伯上资源运算.数据并行,比较通用简便实现大规模并行方式,同时使用多个硬件资源计算不同bat ...

  10. 10行代码使用python统计词频

    # -*- coding: utf-8 -*- #!/usr/bin/env python import re f = open("C:\\Users\\陶敏\\Documents\\Pys ...