大体已经学完ssh了  感觉一起做一个项目有点难 计划先用一下独立的Structs 然后再把数据库操作换成hibernate  然后在用Spring 整合 计划用10天左右吧

但今天开始用Structs的时候 竟然发现好多东西都忘了 无从下手 所以计划用两天以内的时间快速复习一下Structs' 近两天内写一个基于Structs的项目 然后 根据这个项目开始后面的更改

首先搭建环境 第一个hellowold项目 由于是第二次学了 会很快 有一些讲的省略的地方还希望多包含

首先 新建 web项目

然后导入jar包

web.xml配置

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

Struct.xml

<?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>
<!--
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" /> <include file="example.xml"/> <package name="default" namespace="/" extends="struts-default">
<default-action-ref name="index" />
<action name="index">
<result type="redirectAction">
<param name="actionName">HelloWorld</param>
<param name="namespace">/example</param>
</result>
</action>
</package>
--> <constant name="struts.devMode" value="true" />
<package name="default" namespace="/" extends="struts-default"> <action name="hello">
<result>
/Hello.jsp
</result>
</action>
</package>
<!-- Add packages here --> </struts>

浏览器输入:http://localhost:6666//Struts2_0100_Introduction/hello

Structs复习 开始 第一个helloworld项目的更多相关文章

  1. Cordova入门系列(二)分析第一个helloworld项目 转发 https://www.cnblogs.com/lishuxue/p/6015420.html

    Cordova入门系列(二)分析第一个helloworld项目   版权声明:本文为博主原创文章,转载请注明出处 上一章我们介绍了如何创建一个cordova android项目,这章我们介绍一下创建的 ...

  2. struts2学习笔记--动手搭建环境+第一个helloworld项目

    在Myeclipse中已经内置好了struts2的环境,但是为了更好的理解,这里自己从头搭建一下: 前期准备:下载struts2的完整包,下载地址:https://struts.apache.org/ ...

  3. 第二章——建立一个HelloWorld项目,练习使用git的add/commit/push/pull/fetch/clone等基本命令。比较项目的新旧版本的差别-----答题者:徐潇瑞

    1.首先下载安装git,很简单所以就不详细说了,当弹出一个类似的命令窗口的东西,就说明Git安装成功 2.因为Git是分布式版本控制系统,所以需要填写用户名和邮箱作为一个标识 3.接着,注册githu ...

  4. 用Spring3编写第一个HelloWorld项目

    第一个HelloWorld程序 让我们用Spring来写第一个应用程序吧. 完成这一章要求: 熟悉Java语言 设置好Spring的环境 熟悉简单的Eclipse IDE的操作 如果你还没有设置好环境 ...

  5. Cordova入门系列(二)分析第一个helloworld项目

    版权声明:本文为博主原创文章,转载请注明出处 上一章我们介绍了如何创建一个cordova android项目,这章我们介绍一下创建的那个helloworld项目的代码,分析其运行. MainActiv ...

  6. 2.每人自己建立一个HelloWorld项目,练习使用git的add/commit/push/pull/fetch/clone等基本命令。比较项目的新旧版本的差别。答题人:张立鹏

    第1步:创建SSH Key.在用户主目录下,看看有没有.ssh目录,如果有,再看看这个目录下有没有id_rsa和id_rsa.pub这两个文件,如果已经有了,可直接跳到下一步.如果没有,打开Shell ...

  7. Spring Boot创建一个HelloWorld项目

    目录 Spring Boot 简介 微服务框架 以前使用spring开发web的方式 Spring Boot 启动器介绍 如何创建一个helloword的SpringBoot项目 Spring Boo ...

  8. 第二章-如何使用github建立一个HelloWorld项目,git的add/commit/push/pull/fetch/clone等基本命令用法。--答题人:杨宇杰

    1.配置Git 首先在本地创建ssh 秘钥:在git bash输入: $ ssh-keygen -t rsa -C "your_email@youremail.com" eg:$ ...

  9. (转)Android Studio系列教程一下载与安装 背景Android Studio VS Eclipse准备下载创建HelloWorld项目

    背景 相信大家对Android Studio已经不陌生了,Android Studio是Google于2013 I/O大会针对Android开发推出的新的开发工具,目前很多开源项目都已经在采用,Goo ...

随机推荐

  1. C#语言基础知识

    一. string i_str = "321"; string 型,强制转换成 int 型 int i_int1 = int.parse(i_str); string 型,强制转换 ...

  2. 文件IO-Linux

    pcb:结构体 一个进程由一个文件描述符表:1024,前三个占用,文件描述符作用,需要磁盘文件. 1:open.close int open(const char* pathname,int flag ...

  3. hadoop分布式集群的搭建

    电脑如果是8G内存或者以下建议搭建3节点集群,如果是搭建5节点集群就要增加内存条了.当然实际开发中不会用虚拟机做,一些小公司刚刚起步的时候会采用云服务,因为开始数据量不大. 但随着数据量的增大才会考虑 ...

  4. 测试oracle数据库连接

    1.ping 192.168.0.12.telnet 192.168.0.1 1521 按下ctrl+] 组合键出现命令回显才是端口连接成 3.tnsping 192.168.0.1:1521/db

  5. RocketMQ源码分析:(一)安装与案例演示

    环境: Windows 暂时理解的功能图,不定时改动: 1. 克隆rocketmq代码 git clone git@github.com:apache/rocketmq.git 2. 进入rocket ...

  6. [UGUI]帧动画

    ImageFrameAnimation.cs using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; [R ...

  7. SAP HANA HDBSQL命令

    1.登录: window操作系统下面: 打开C:\Program Files\SAP\hdbclient\hdbsql.exe \c 连接数据库  connect的缩写 HANA hostname:  ...

  8. SVG:中国地图

    中国地图 <svg height="578" version="1.1" width="718" xmlns="http:/ ...

  9. hive随机采样

    hive> select * from account limit 10;OKaccount.accountname     account.accid   account.platid  ac ...

  10. 关于spire wb.SaveToPdf(f_pdf) excell 转为pdf 乱码问题

    excell 可以合并单元格,但是在单元格内容不要用 alt+enter换行,否则就会出现乱码.