Tomcat问题,不能正确访问http://localhost:8080/
最近在学Struts2框架部分的内容,但是eclipse中配置tomcat遇到了很大的问题,当辛辛苦苦的配置完了之后,竟让连小猫的首页都不能访问,http://localhost:8080/输入了之后提示HTTP Status 404
type Status report message /sOffice2/ description The requested resource is not available.
于是乎,心酸的查找bug开始了,
(1)首先xxx.jsp文件必须放在WebContent目录下面,而不能放在WEB_INF目录之下
(2)第二个问题是在Stack overflow上面找到了答案:
:Click on Window > Show view > Server or right click on the server in "Servers" view, select "Properties".
:In the "General" panel, click on the "Switch Location" button.
:The "Location: [workspace metadata]" should replace by something else.
:Open the Overview screen for the server by double clicking it.In the Server locations tab , select "Use Tomcat location".(此时有可能界面为灰色)
:Save the configurations and restart the Server.

方法里面说将tomcat换成自己的安装的tomcat,但是界面是灰色的,怎么办呢?原来是因为我们将项目部署到了tomcat上面,因此需要移除项目,在项目上面右击——Remove
此时Server locations界面即可用,"Deploy Path"后面的值默认是"wtpwebapps",把它改成"webapps",(这里面改成webapps也就是找到自己安装tomcat的目录,只不过换了名字之后软件可以自己定位到目录)
到此,问题就搞定了,入托上面两个方法我全部都没有用。
(3)即使eclipse中的tomcat服务器打开了,也没有,必须把外部的tomcat服务器打开。
c
Tomcat问题,不能正确访问http://localhost:8080/的更多相关文章
- eclipse配置tomcat,访问http://localhost:8080出现404错误
问题:通过eclipse来启动tomcat会碰到“访问http://localhost:8080出现404错误”这样的问题,需要在eclipse中进行一系列的设置才行. 解决:打开eclipse的s ...
- eclipse启动tomcat 访问http://localhost:8080 报404错误
eclipse启动tomcat 访问http://localhost:8080 报404错误 Server Locations修改后会变灰,如果需要更改设置,则需要移除与Tomcat服务器关联的项目, ...
- eclipse启动tomcat访问http://localhost:8080 报404错误
eclipse正常启动tomcat,但是 访问http://localhost:8080 却报404错误 修改下配置 就好操作如下图 打开eclipse的server视图,双击配置好的那个tomcat ...
- eclipse创建spring boot项目,tomcat启动成功,但http://localhost:8080无法访问报错404解决方案
spring boot的启动程序启动后,在访问http://localhost:8080地址的时候出现了错误,为什么出错网上我找了好久也没有得出具体的解决办法 当我指定到具体的action的时候,却可 ...
- 发布b3log-solo后,访问http://localhost:8080/b3log-solo/提示错误为staticServePath Error。
发布b3log-solo后,访问http://localhost:8080/b3log-solo/提示错误为staticServePath Error. latke.props内容为: serverS ...
- tomcat能正常启动,但是http://localhost:8080/网页就是打不开,报404
问题描述: 在IDE中创建了一个新的Servers,并且加入一个Tomcat.然后启动服务,进入浏览器,输入localhost:8080进入,显示错误.服务是可以正常启动的,而且没有任何异常. 问题描 ...
- tomcat配置问题:访问http://localhost:8080/ 遇到 Access Error: 404
win7: 8080端口已经被其他应用使用,比如nixxxxxxxxxxxxx When I had an error Access Error: 404 -- Not Found I fixed i ...
- 在tomcat中的conf文件夹下找server.conf 配置如下代码,可省略项目名路径访问 如 localhost:8080 即可访问到项目
<Context path="" docBase="C:\Workspaces\Projects\SLSaleSystem_dw\WebRoot" rel ...
- eclipse启动tomcat, http://localhost:8080无法访问
原地址 症状: tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误.同时其他项目页面也不能访问. 关闭eclipse里面的 ...
随机推荐
- Webstorm 10 for mac osx 注册机,序列号,kegen
小菜最近get到mac体验机会,早就耳闻mac非常适合做开发,于是迫不及待的安装各种开发工具,不知不觉,轮到前端开发神器webstorm了,看了一下官网的价格,心拔凉拔凉的. 果断搜索注册机,搜到的结 ...
- js动态生成选项之考试系统(一)
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"% ...
- springboot之filter/listener/servlet
简介 SpringBoot可以简化开发流程,但是在其中如何使用传统的J2EE servlet/listener/filter呢 @Bean配置 在Configuration类中加入filter和ser ...
- AngularJS 源码分析2
上一篇地址 本文主要分析RootScopeProvider和ParseProvider RootScopeProvider简介 今天这个rootscope可是angularjs里面比较活跃的一个pro ...
- 由ArcMap属性字段自增引出字段计算器使用Python的技巧
1.前言 前些日子有人问我ArcMap中要让某个字段的值实现自增有什么方法?我首先想到像SQL Server中对于数值型字段可以设置自增.所以我打开ArcCatalog查看发现只提供默认值 ...
- Javascript算法系列之快速排序(Quicksort)
原文出自: http://www.nczonline.net/blog/2012/11/27/computer-science-in-javascript-quicksort/ https://gis ...
- JSON和JS对象之间的互转
1. jQuery插件支持的转换方式 $.parseJSON( jsonstr ); //jQuery.parseJSON(jsonstr),可以将json字符串转换成json对象 2. 浏览器支持的 ...
- Create views of OpenCASCADE objects in the Debugger
Create views of OpenCASCADE objects in the Debugger eryar@163.com Abstract. The Visual Studio Natvis ...
- 在Linux客户机与Windows宿主机之间建立共享(VitrualBox)
VirtualBox中,如果客户机和宿主机都是Windows的话,共享相对是比较方便的.一般是通过\\vboxsvr\shared 这样的路径访问即可. 但是如果客户机是Linux的话,就略微麻烦一点 ...
- Ubuntu杂记——链接ln的使用:创建和删除符号链接
原文链接:http://blog.csdn.net/janpylx/article/details/6761910 一 . 使用方式 ln [option] source_file dist_file ...