zoukankan      html  css  js  c++  java
  • /build-impl.xml:1030: The module has not been deployed.(netbean javaweb)

    我在netbean上创建了一个javaweb,这个项目创建成功了,但是运行时却有了错误,错误贴图如下

    报错:

    The module has not been deployed.  See the server log for details.

    一开始就把这条error google了一下,但并没有什么用

    我重新检查了我的tomcat-users.xml文件,配置如下

    <role rolename="admin-gui"/>
    <role rolename="manager-gui"/>
    <role rolename="manager-script"/>
    <user username="YourUser" password="YourPassword" roles="admin-gui,manager-gui,manager-script"/>

    然后我有重新看了一下错误提示,发现FAIL - Deployed application at context path [/WebApplication2] but context failed to start

    查看了tomcat-manager

     发现这个路径没有开启,点击start

    FAIL - Application at context path [/WebApplication2] could not be started
    到这个步骤问题就很明显了
    查看WEB-INF文件夹下有没有web.xml文件
    没有的话,就创建一个,内容
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
     Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License.  You may obtain a copy of the License at
    
          http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    -->
    <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_4_0.xsd"
      version="4.0"
      metadata-complete="true">
    
      <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description>
    
    </web-app>

    这样就可以了

    PS:无论在哪个操作系统中ide中的tomcat不能与系统中的tomcat同时启动,因为会发生端口占用问题,如果两个端口不同就没什么事情了(myeclipse除外:他是自带tomcat的)

     
  • 相关阅读:
    Linux九阴真经之催心掌残卷5(正则表达式)
    Linux九阴真经之催心掌残卷4(grep文本处理 )
    Linux九阴真经之催心掌残卷3
    Linux九阴真经之催心掌残卷2
    0.1.kubeadm快速部署kubernetes
    0.2.kubeadm搭建kubernetes高可用集群(CentOS)
    Nginx——模块(1)
    Nginx——主配置段
    Nginx——安装
    Nginx——I/O模型
  • 原文地址:https://www.cnblogs.com/callmelord/p/11555587.html
Copyright © 2011-2022 走看看