您的位置:澳门皇家娱乐场 > 澳门皇家娱乐场 > git安装以及利用,使用maven插件运转tomcat服务器

git安装以及利用,使用maven插件运转tomcat服务器

发布时间:2019-10-09 06:28编辑:澳门皇家娱乐场浏览(194)

    一对人运营项目时不希望用本身配置的tomcat运营,而是想用maven自带的插件运维,接下去给大家大饱眼福下自个儿用插件运转的历程。在pom.xml中投入下列代码

    表单代码:

    Ajax 即“Asynchronous Javascript And XML”(异步 JavaScript 和 XML),是指一种创制交互式网页应用的网页开拓技艺。Ajax = 异步 JavaScript 和 XML(标准通用标识语言的子集)。Ajax 是一种用于创设急速动态网页的才能。Ajax 是一种在无需另行加载整个网页的气象下,可以更新部分网页的才能。也正是说,允许浏览器与服务器通信而无需刷新当前页面的技艺。通过在后台与服务器举办少许数据沟通,Ajax 能够使网页达成异步更新。那象征能够在不重复加载整个网页的状态下,对网页的某有个别开展更新。古板的网页假诺急需立异内容,必得重载整个网页页面。**率先举个简易的get央求的例子

    图片 1图片.png点击next图片 2图片.png填上包名和类型名点击next图片 3图片.png点击next图片 4图片.png点击finish,maven就创设成功了。图片 5图片.png在resources上点击右键如下图所示图片 6图片.png

    git是布满式版本调整系统开采者能够提交。1、步入职业目录,开首化二个仓房,展开Git Bash Here;

    <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>80</port><!--访问的端口号--> <path>/</path> <uriEncoding>UTF-8</uriEncoding> <server>tomcat7</server> </configuration> </plugin> </plugins> </build>
    
     <input type="text" name="name" > <input type="text" name="age" > <input type="text" name="gender" > <input type="button" value="提交"> </form>
    
    <%@ page contentType="text/html;charset=UTF-8" language="java" %><html><head> <title>首页</title> <script type="text/javascript"> window.onload = function () { //1.获取a节点,为其添加onclick响应函数 document.getElementsByTagName[0].onclick = function(){ //3.创建一个XMLHttpRequest对象 var request = new XMLHttpRequest(); //4.准备发送请求数据:url //添加时间戳,起到禁用缓存的作用 var url = this.href + "?time=" + new Date(); var method = "GET"; //5.调用XMLHttpRequest对象的open方法 request.open(method,url); //6.调用XMLHTTPRequest对象的send方法 request.send; //7.为XMLHttpRequest对象添加onreadystatechange响应函数 request.onreadystatechange = function () { //8.判断相应是否完成:XMLHttpRequest对象的readyState属性值为4的时候 if(request.readyState==4){ //9.再判断相应是否可用:XMLHTTPRequest对象的status属性值为200 if(request.status==200||requrst.status==304){ //10.打印相应结果:requestText alert(request.responseText); } } } //2.取消a节点的默认行为 return false; } } </script></head><body><a href="login.jsp">超链接</a></body></html>
    

    将在须要的包下载就可以。

    输入指令:git init

    图片 7image.png图片 8image.png然后探问

    js代码

    兑现效果与利益正是弹出login.jsp的剧情而不让页面刷新。在<javascript>标签里面编写AJAX代码1.创建表单

    图片 9图片.png

    图片 105135308-dcc4c056d2bf172c.png

    <script src="js/jquery-1.11.1.min.js"></script><script> var a = "1111"; var JSONObject = { "name":a, "age":"13", "gender":"女" }; document.getElementById.value=JSONObject.name document.getElementById.value=JSONObject.age document.getElementById.value=JSONObject.gender</script>
    
    <form> <input type="text" name="name" > <input type="text" name="age" > <input type="text" name="gender" > <input type="button" value="提交"> </form>
    

    pom.xml

    出现.git文件夹,这么些文件夹属于版本库。

    git安装以及利用,使用maven插件运转tomcat服务器。运维页面

    2.编写js部分

    <?xml version="1.0" encoding="UTF-8"?><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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.zr.maven</groupId> <artifactId>TestMaven</artifactId> <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <spring.version>4.1.4.RELEASE</spring.version> <jackson.version>2.5.0</jackson.version> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <!-- spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> <scope>test</scope> </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> <!-- mysql连接 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <!-- 数据源 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.12</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.8.4</version> </dependency> <!-- log4j --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <!-- servlet --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>3.0-alpha-1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <!-- json --> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.13</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency> <!-- 文件上传 --> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId> <version>0.9.1.2</version> </dependency> </dependencies> <build> <finalName>ssm</finalName> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>8088</port> <path>/ssm</path> <uriEncoding>UTF-8</uriEncoding> <finalName>mgr</finalName> <server>tomcat7</server> </configuration> </plugin> <plugin> <!-- 配置tomcat-maven-plugin插件--> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <path>/wp</path> <port>8088</port> <uriEncoding>UTF-8</uriEncoding> <url>http://localhost:8080/manager/html</url> <server>tomcat6</server> </configuration> </plugin> <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>
    

    图片 11image.png

    本文由澳门皇家娱乐场发布于澳门皇家娱乐场,转载请注明出处:git安装以及利用,使用maven插件运转tomcat服务器

    关键词:

上一篇:没有了

下一篇:没有了