我在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的)

 

最新文章

  1. Emeditor批量修改文件编码格式(UTF-8)
  2. Spring Security笔记:自定义Login/Logout Filter、AuthenticationProvider、AuthenticationToken
  3. myeclipse10.7破解成功 但 无法打war包 提示:securecrt alert:integrity ch
  4. php+mysql+apache项目运行所遇到的一系列配置问题
  5. 2、HDFS和Yarn的基础学习笔记
  6. jMeter 监控cpu、内存
  7. 关于C++引用的一些注意点
  8. JavaScript学习心得(五)
  9. rpm安装FAQ
  10. angular.js的ng-app 指令定义一个 AngularJS 应用程序。
  11. LeetCode-Palindrome Partitioning II[dp]
  12. Linux用户和组管理,添加修改用户,添加修改组,加入组,移除组
  13. SSRS报表服务随笔(rdl报表服务)-报表数据:使用第三方控件生成条形码
  14. 基于 websocket 实现的 im 实时通讯案例
  15. WGAN讲解
  16. Android星球效果实现
  17. 异常处理与MiniDump 用于投放市场c++异常捕获
  18. .NetCore使用Swagger进行单版本或多版本控制处理
  19. #C++初学记录(ACM试题1)
  20. 分享8个常用的jQuery焦点图插件

热门文章

  1. Guava源码阅读-base-Strings
  2. day34 并行并发、进程开启、僵尸及孤儿进程
  3. linux-关闭文件
  4. 【转帖】linux下的各个目录的含义
  5. linux:date 计算一组命令所花费的执行时间
  6. [转载]Python 魔法方法详解
  7. python 类(3) property
  8. pb datawindow的用法
  9. js gridview中checkbox的全选与全不选
  10. js ajax return false了,仍然会往下执行