zoukankan      html  css  js  c++  java
  • shop--1.创建maven项目

    加入运行时所需要的包

    j2se-1.5 但是用的jdk是1.8所以在pom.xml中的<bulid></bulid>中加入
    <plugins>
      <plugin>
       //http://mvnrepository.com/search?q=maven-compiler-plugin 要把denpendency去掉
       <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
    <version>3.7.0</version>
    //然后指明使用的源等信息
    <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <encoding>UTF8</encoding>
          </configuration>
    </plugin>
    </plugins>

    接着建包

     保证输出的在一个folder下

    改动相关配置

    其中改Dynamic Web Module

    需要在项目目录下更改

    <?xml version="1.0" encoding="UTF-8"?>
    <faceted-project>
      <fixed facet="wst.jsdt.web"/>
      <installed facet="wst.jsdt.web" version="1.0"/>
      <installed facet="java" version="1.8"/>
      <installed facet="jst.web" version="3.1"/>
    </faceted-project>

    接着更改web.xml中的

    <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">
      <display-name>Archetype Created Web Application</display-name>
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
    </web-app>

    访问index.html 即可

  • 相关阅读:
    3、linux网络编程--网络字节序
    1、linux网络编程--网络协议
    第四篇:进程
    第五篇:进程通信
    第六篇:线程原理
    操作系统基本概念
    第一篇:基础原理篇
    第二篇:操作系统历史
    (2)linux下的简单的socket通信实例
    (3)基于linux的socket编程TCP半双工client-server聊天程序
  • 原文地址:https://www.cnblogs.com/windbag7/p/9322124.html
Copyright © 2011-2022 走看看