这个工程主要用来研究log4j,所以就只有一个页面,希望以后慢慢进步。

java动态生成网页主要使用servlet。把请求拦截下来,处理后返回结果。


这里创建的是一个maven工程。 结构如下:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcsAAAHVCAIAAAARvEf7AAAgAElEQVR4nO3da3Mc133ncbyDrdoHqa2t2iqvayubbOzIcixFi20OLrxABEmQxACESJgETcmmRjOkBJGiJAKcgURLFGDzYk2HBEVSFxvTJA2MFVvyhQ079iZbdrKxndixLdlKbK8cVR7ESWxLVNWmVtE+6Nvp6/T09JkbvqhPqWYafbp7Gpofz5zuOf+e99/yAdt73vOe8fHxga37kJbM0K4t4x9r+WEAaImeoITdi7Rkhsa3jH+05YcBoCUCEvZWZSsAoHEBCav0DQAAGkfCAoAsPe+8884bb7yR6R8gYQEgXT233PrBg/fmfv3rX5OwAJCunvff8oEP3X7722+/nW7Cfu38AY/Z/GjLXy0ANJOscVh/wnZEyPZmJoqaXs73t/xIWnYGxucquq5rc9nM2j0JSt9Ab2ZHYWFxZt+aPgmc7cY1NWEDia1yqr7q/tHVQoK951RdbJgtaWJkeJ66/9JRCWv8NtkhhR2n8TKNPWZLmq5rxfH6/j9L1ipMMxO2N68aL79SmghcYeuhhcXZKePtd9H6WVycnXQfW29mamZxoTCS5gG36j3vfy1bDy0YL3xmX3/Eqaj5q8XZqbBdTM46Dc3m1sp1mZxdFBtuPbSwuHB4q3UYnqfxz7bn+JMd2PyhHU3+UxqiErZSqVSDfpaWlmpuN1nCWie0UNbVXJ3vcDEce/OqnRFmLAoZlFP1sLd0jYQdn6toWqX+YwuTU3Vd2FpO1RNkZbJWoaexuX3Y3kyhrAf/OXpHDs8vHN6a6fe8/Xr3zRpxI6689dBCum+hFvaq/K/FDoiIUxFxwL0jh+cXFuaFzA08Xb2ZqRnfv151najefbN2hpqxKER5RMzVSFjf8Sf6a6b8b3BMUQm7/8A9gQk7tT8gFj3C0jPOOikk7PhcxQodY2tl1fpVZqKoheZRdMJmS1q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+H5YY1hAvzZ3YPOuU9esS1UX1MA+7Harqxtwpct3lUzcOFe6AMTUMd/pkv2Ng8DBAQBoRDsmbHOMDE+cuua6r8AYtwWAtKzdhN3uHg0gXgGkbk0nLABIRcICgCwkLADIQq1ZAJCFhAUAWUhYAJCFhAUAWUhYAJCFhJWiN1Mo62ou09/yIwHQQm2asHfuy4/NfGokP7t+dHf20bO7n/rMrrkLgzvuGhjesfPoqd2nXph4/NLGXVMtP84wJCwApW0TdscDj+9ZqOwqnt/91Gf2LFQM47PliSeetZ/ueuyZlh9nGBIWgNK2CTs+WzZidOvBY/1bRu/6+GXj6Y4HTg4M7xibObdnobJnfqnlxxmGhAWgtGnC9q/f89Sn9yxURh85YywZL/7RnoXKxOOX1g1sUPoGdjz4ceOp2Ko3M1HU9HK+ULYmcynn+61fOQt1K/h6M4WyrhXzcxVdN1buzZv1YyqlCXHL2ZJmt8qpuq4WarYlYQEo7Zmwg1tHjR7r0IdzSt+A0j+4+9QLexYq23KPGiuMzXxqz0Jl9OFPiq2MhHUCNK8aj414tUPTs1zX5rIZMx91taD0DfSOz1V84ZhT9UppojevmuvXakvCAlDaM2E37fmYkbADwzuUvoH+LVbg7r5b6RtQ+tfvfurTexYqW3PHxVZWH7bf89SORe9yox86LvRnfY+FjRfKuq7XWt9+TMICUNozYbfe+8iehcruUy+s6x9Q+gY27b5HDNyBrTvNwJ08KLaqJ2HtECRhAUjUjgk7emxhz0Jl7PhZ46kduEr/oNI3MLTHDNzBbWNiK3OUQC0YT+3B04BRAueTfmRKjs9VrIXGKEG2pMVtS8ICaM+ENe4cGCmcMJ56AnfbvQ/vWajsfuoz6wbWi63MTquqeq5oKdFXumIkbE61hlytECdhAcTRjgmbjGeUAABajoQFAFlIWACQpXsSFgDaDQkLALKQsAAgCwkLALKQsAAgCwkLALKQsAAgy/8HRSdFpIuZjy0AAAAASUVORK5CYII=" alt="" />

因为是部署在tomcat容器中,所以需要配置 web.xml,主要处理逻辑在HelloWorldController.java,spring-context-config.xml 里面是spring的配置,主要是开包扫描加载controller的注解。


下面是例行的贴代码:

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.demo</groupId>
<artifactId>test-web-app</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>TestWebApp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!-- 添加spring-context包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!-- 添加spring-tx包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!-- 添加spring-jdbc包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!-- 为了方便进行单元测试,添加spring-test包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!--添加spring-web包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!--添加aspectjweaver包 -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.5</version>
</dependency>
<!-- 添加mybatis的核心包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.8</version>
</dependency>
<!-- 添加mybatis与Spring整合的核心包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
</dependency>
<!-- 添加servlet3.0核心包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.2-b01</version>
</dependency>
<!-- jstl -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- ODBC14 -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.1.0</version>
</dependency>
<!-- DBCP包 -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- 添加druid连接池包 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.12</version>
</dependency> <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</dependency>
</dependencies>
<build>
<finalName>TestWebApp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

pom.xml

 <?xml version="1.0" encoding="UTF-8"?>
<web-app 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_3_0.xsd"
version="3.0">
<!-- icon -->
<!-- display-name -->
<display-name>TestWebApp</display-name>
<!-- context-param -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring-context-config.xml</param-value>
</context-param>
<!-- filter -->
<!--<servlet>-->
<!--<servlet-name>HelloWorld</servlet-name>-->
<!--<servlet-class>me.demo.controller.HelloWorldController</servlet-class>-->
<!--</servlet>-->
<!--<servlet-mapping>-->
<!--<servlet-name>HelloWorld</servlet-name>-->
<!--<url-pattern>/HelloWorld</url-pattern>-->
<!--</servlet-mapping>-->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</filter>
<!-- filter-mapping -->
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- listener servlet -->
<listener>
<description>Spring监听器</description>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- servlet -->
<!-- servlet-mapping -->
<!-- session-config -->
<!-- mime-mapping -->
<!-- welcom-file-list -->
<welcome-file-list>
<welcome-file>HelloWorld</welcome-file>
</welcome-file-list>
<!-- error-page -->
<!-- taglib -->
<!-- resource-env-ref -->
<!-- resource-ref -->
<!-- security-constraint -->
<!-- login-config -->
<!-- security-role-->
<!-- env-entry -->
<!-- ejb-ref -->
<!-- ejb-local-ref -->
</web-app>

web.xml

 package me.demo.controller;

 import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; /**
* Created by bl05973 on 2015/12/15.
*/
@WebServlet("/HelloWorld")
public class HelloWorldController extends HttpServlet {
Log logger = LogFactory.getLog(HttpServlet.class); public void run(String param) {
System.out.println("[Sysout]"+param);
logger.info("[run] param is" + param);
} public void run() {
run("null");
} public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
run();
request.getRequestDispatcher("/HelloWorld.jsp").forward(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String param = request.getParameter("param");
run(param);
request.getRequestDispatcher("/HelloWorld.jsp").forward(request, response);
} public void init() {
logger.info("init ----------------------------------------------------------------------");
}
}

HelloWorldController.java

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 对 me.demo.service 的包扫描 -->
<context:component-scan base-package="me.demo.service" />
</beans>

spring-context-config.xml

 <%--
Created by IntelliJ IDEA.
User: bl05973
Date: 2015/12/15
Time: 15:19
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>HelloWorld</title>
<script type="text/javascript">
<!--
function jump(target) {
window.location.href = target;
}
-->
</script>
</head>
<body>
Hello World!
<form method="post" target="/HelloWorld" >
<input name="param" type="text" />
<input type="submit">
</form>
</body>
</html>

HelloWorld.jsp

运行的主要流程就是HelloWorldController 里面重写了 doGet 和 doPost 方法,tomcat拿到 /HelloWorld 的请求会交给这个controller来处理。然后他处理完后台逻辑,会在最后一句的时候加载 HelloWorld.jsp模板,然后展示出来。

第一个JavaWeb工程的更多相关文章

  1. 创建一个JavaWeb工程

    1.用到的工具:eclipse编译器+Tomcat9,在自己电脑上已配置好jdk和tomcat的环境变量 2.新建一个project 2.选择web文件中的Dynamic Web project,进入 ...

  2. 使用Eclipse EE(汉化版) 创建一个JavaWeb工程

    第一步:打开eclipse ee,单击“文件”-->单击“新建”-->单击“动态Web项目”. 若没找到“动态Web项目”,单击“其他” -->在弹出的窗口中打开“Web”下拉菜单 ...

  3. (转) SpringBoot非官方教程 | 第一篇:构建第一个SpringBoot工程

    简介 spring boot 它的设计目的就是为例简化开发,开启了各种自动装配,你不想写各种配置文件,引入相关的依赖就能迅速搭建起一个web工程.它采用的是建立生产就绪的应用程序观点,优先于配置的惯例 ...

  4. maven构建的模块化的JavaWeb工程

    最近对maven构建的模块化的JavaWeb工程,比较感兴趣,所以自己就想从头弄一个出来,在此做一个记录,供以后学习. 前置条件:电脑上有eclipse(或者myeclipse,记事本也可以,那样就得 ...

  5. Linux环境下在Tomcat上部署JavaWeb工程

    本文讲解如何将我们已经编译好的JavaWeb工程在Linux环境下的Tomcat上进行部署,总体上的思路是和Windows下JavaWeb项目部署到tomcat差不多,具体步骤和命令如下. 注:部署之 ...

  6. Intellij Idea创建的第一个JavaWeb程序

    第一个JavaWeb程序 1. 创建 2. 目录结构 src目录用于放java源文件,web目录用于放web资源,WEB-INF是Java web应用固定的存放配置及类库的目录,index.jsp是我 ...

  7. idea中创建maven的Javaweb工程并进行配置

    学完maven后,可以创建maven的javaweb工程,在创建完成后还需要一些配置,下面来说下具体步骤,在这里我创建的是一个模块,创建web项目的方式和创建模块一样 1.创建一个模块,点new-Mo ...

  8. Eclipse中一个Maven工程的目录结构

    在之前的javaSE开发中,没有很关注Eclipse工程目录下的环境,总是看见一个src就点进去新建一个包再写一个class.以后的日子中也没有机会注意到一个工程到底是怎么组织的这种问题,跟不要说自己 ...

  9. 第一个FPGA工程----点亮开发板上的3个LED灯

    第一个FPGA工程----点亮开发板上的3个LED灯 1.新建FPGA工程 开启Quartus2的画面 File--New Project Wizard..指定工程的路径与工程名 指定所使用的FPGA ...

随机推荐

  1. 在centos系统中增、删交换分区

    Swap介绍: Linux 将物理内存分为内存段,叫做页面.交换是指内存页面被复制到预先设定好的硬盘空间(叫做交换空间)的过程,目的是释放对于页面的内存.物理内存和交换空间的总大小是可用的虚拟内存的总 ...

  2. Hive中的一种假NULL

    Hive中有种假NULL,它看起来和NULL一摸一样,但是实际却不是NULL. 例如如下这个查询: hive> desc ljn004; OK a       string Time taken ...

  3. Linux mysql-5.7.17安装 教程

    1.下载安装文件 #mkdir /data #mkdir /data/software #cd  /data/software #wget http://dev.mysql.com/get/Downl ...

  4. Vue官网todoMVC示例

    这个示例是模仿官网示例样式和功能用我自己的方式写的,基本上没有看官网的源码,只参考自定义指令.让我们一步步来探讨一下.官网demo 要实现的功能 单条添加todo 单条删除todo 双击编辑todo ...

  5. STM32利用TIM3产生一个1--100Hz可调频率

    目标:利用TIM3结合普通GPIO实现一个1--100HZ的可控频率,误差在0.5HZ以内 核心:要实现该功能首先要明确频率的定义,频率就是1秒内发生周期性变化的次数,例如一个正弦波,1S内,走了15 ...

  6. css预编译器——Less的使用

      方法一:仅介绍在客户端环境下使用的方法 1 新建test.less并引入.less该文件(和css一样在head处引入),注意rel="stylesheet/less": &l ...

  7. lua创建文件

    详细描述:http://www.runoob.com/lua/lua-file-io.html Lua文件I/O 1. 简单模式 -- 以只读方式打开文件-- file = io.open (file ...

  8. MySQL 创建表时,设置时间字段自己主动插入当前时间

    MySQL 创建表时,设置时间字段自己主动插入当前时间 DROP TABLE IF EXISTS `CONTENT`; CREATE TABLE `CONTENT` ( `ID` char(20) N ...

  9. HDU 3723

    把向上看成+1,向下看成-1.可以知道符合卡特兰数的一般解释了.记作Can(i) 中间平过的即是0.亦即是C(n,2*i),i表示向上的数. 于是总的就是sum(C(n,2*i)*Can(i)),i从 ...

  10. Android TextView 横向滚动(跑马灯效果)

    Android TextView 中当文字比較多时希望它横向滚动显示,以下是一种亲測可行的方法. 效果图: 1.自己定义TextView,重写isFocused()方法返回true,让自己定义Text ...