zoukankan      html  css  js  c++  java
  • java web 项目启动的根目录,以及项目启动后使用的端口具体是哪一个

    1.今天启动项目发现一直找不到网页,原来是自己浏览器地址的根目录出现了问题,那么系统中的根目录(也就是项目名)到底是哪个,究竟以哪个为基准?

    这里有一地方不能忽视:见图片

    在普通的java web项目中(建立动态网页工程)时,项目名,通常和图上的Path名字默认是一致的

    但是在maven项目中(尤其是maven项目中包含多个模块的)像下图所示:建立的maven项目名称是ksplatform,但是这个maven项目中包含了多个模块,如ksplatform-modules-core模块、ksplatform-modules-ui模块、ksplatform-modules-systemmanager模块等等,详情见Pom.xml文件:

    <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>
      <parent>
        <groupId>cn.com.ksplatform</groupId>
        <artifactId>ksplatform</artifactId>
        <version>0.0.1-SNAPSHOT</version>
      </parent>
      <artifactId>ksplatform-modules-web</artifactId>
      <packaging>war</packaging>
      <dependencies>
          <dependency>
              <groupId>cn.com.ksplatform</groupId>
              <artifactId>ksplatform-modules-core</artifactId>
              <version>0.0.1-SNAPSHOT</version>
              <scope>runtime</scope>
          </dependency>
          <dependency>
              <groupId>cn.com.ksplatform</groupId>
              <artifactId>ksplatform-modules-ui</artifactId>
              <version>0.0.1-SNAPSHOT</version>
              <scope>runtime</scope>
          </dependency>
          <dependency>
              <groupId>cn.com.ksplatform</groupId>
              <artifactId>ksplatform-modules-cache</artifactId>
              <version>0.0.1-SNAPSHOT</version>
              <scope>runtime</scope>
          </dependency>
          <dependency>
              <groupId>cn.com.ksplatform</groupId>
              <artifactId>ksplatform-modules-systemmanager</artifactId>
              <version>0.0.1-SNAPSHOT</version>
              <scope>runtime</scope>
          </dependency>
      </dependencies>
    </project>

    这个时候的  Path默认显示的是含有webapp文件夹的那个模块,所以如果,在浏览器中输入项目的名字的时候,应该以

    中的Path值为准!!

  • 相关阅读:
    [转]Ubuntu设置Redhat风格的SHELL提示符PS1属性
    [转]Ubuntu Adsl 上网
    [转]Bash中的PS1详解
    Verilog 关于用task仿真应注意的一个问题
    [转]提高编程技能最有效的方法
    [转]ubuntu 终端常用命令
    [转]VMware Workstation 7.1 正式版 For Linux
    [转]Vim基本操作
    [转]Ubuntu Linux下设置IP的配置命令
    xilinxftp.newlocation
  • 原文地址:https://www.cnblogs.com/zhangshitong/p/5201819.html
Copyright © 2011-2022 走看看