我真的是把提问区里所有404的报错全看了!!!还是不行,我的不报错,就是不好解决!!!

我真的是把提问区里所有404的报错全看了!!!还是不行,我的不报错,就是不好解决!!!



运行后呢  会自动弹出 网页,但是是404,我代码没问题,因为 我把自己的备份了后  ,都是copy老师的

我的xml是我自己的。


我看是说 加个 sout的输出看看路径,这个我加了 但是 我不知道如何调试  ,我就是还是点的debug,他也没出来什么路径,我想知道在哪看 怎么调试  ?  然后 404的问题 咋解决  ,没有报错,能远程吗?

或者真的 更详细的 说一下 ,因为代码是老师的  能注意的 我全照做了!!!!!!!!!!!!


<?xml version="1.0" encoding="UTF-8"?>
<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">
<!--    <listener>-->
<!--        <listener-class>com.imooc.icake.global.CatelogTreeListener</listener-class>-->
<!--    </listener>-->
    <filter>
        <filter-name>encoding</filter-name>
        <filter-class>com.imooc.icake.global.EncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

<!--    <filter>-->
<!--        <filter-name>Login</filter-name>-->
<!--        <filter-class>com.imooc.icake.global.LoginFilter</filter-class>-->
<!--    </filter>-->
<!--    <filter-mapping>-->
<!--        <filter-name>Login</filter-name>-->
<!--        <url-pattern>/admin/*</url-pattern>-->
<!--    </filter-mapping>-->

    <servlet>
        <servlet-name>GlobalServlet</servlet-name>
        <servlet-class>com.imooc.icake.global.GlobalController</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>GlobalServlet</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
</web-app>

http://img1.sycdn.imooc.com//climg/5dd6786a092575ce05020108.jpg



E:\Apache\apache-tomcat-8.5.47\bin\catalina.bat run

[2019-11-21 07:18:56,132] Artifact icake:war exploded: Waiting for server connection to start artifact deployment...

Using CATALINA_BASE:   "C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake"

Using CATALINA_HOME:   "E:\Apache\apache-tomcat-8.5.47"

Using CATALINA_TMPDIR: "E:\Apache\apache-tomcat-8.5.47\temp"

Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_101"

Using CLASSPATH:       "E:\Apache\apache-tomcat-8.5.47\bin\bootstrap.jar;E:\Apache\apache-tomcat-8.5.47\bin\tomcat-juli.jar"

Connected to the target VM, address: '127.0.0.1:61764', transport: 'socket'

21-Nov-2019 19:18:56.977 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.鏈嶅姟鍣ㄧ増鏈�:     Apache Tomcat/8.5.47

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄦ瀯寤�:            Oct 7 2019 13:30:46 UTC

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.47.0

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.鐗堟湰:               10.0

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏋舵瀯:                  amd64

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 鐜鍙橀噺:         C:\Program Files\Java\jdk1.8.0_101\jre

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 鐗堟湰:              1.8.0_101-b13

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.渚涘簲鍟�:            Oracle Corporation

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         E:\Apache\apache-tomcat-8.5.47

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake\conf\logging.properties

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61764,suspend=y,server=n

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\86176\.IntelliJIdea2019.2\system\captureAgent\debugger-agent.jar

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake\jmxremote.password

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake\jmxremote.access

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake

21-Nov-2019 19:18:57.008 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=E:\Apache\apache-tomcat-8.5.47

21-Nov-2019 19:18:57.008 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=E:\Apache\apache-tomcat-8.5.47\temp

21-Nov-2019 19:18:57.008 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].

21-Nov-2019 19:18:57.008 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

21-Nov-2019 19:18:57.008 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

21-Nov-2019 19:18:57.008 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c  28 May 2019]

21-Nov-2019 19:18:57.102 淇℃伅 [main] org.apache.coyote.AbstractProtocol.init 鍒濆鍖栧崗璁鐞嗗櫒 ["http-nio-8080"]

21-Nov-2019 19:18:57.148 淇℃伅 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

21-Nov-2019 19:18:57.164 淇℃伅 [main] org.apache.coyote.AbstractProtocol.init 鍒濆鍖栧崗璁鐞嗗櫒 ["ajp-nio-8009"]

21-Nov-2019 19:18:57.164 淇℃伅 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

21-Nov-2019 19:18:57.164 淇℃伅 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 436 ms

21-Nov-2019 19:18:57.195 淇℃伅 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

21-Nov-2019 19:18:57.195 淇℃伅 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.47

21-Nov-2019 19:18:57.227 淇℃伅 [main] org.apache.coyote.AbstractProtocol.start 寮�濮嬪崗璁鐞嗗彞鏌刐"http-nio-8080"]

21-Nov-2019 19:18:57.242 淇℃伅 [main] org.apache.coyote.AbstractProtocol.start 寮�濮嬪崗璁鐞嗗彞鏌刐"ajp-nio-8009"]

21-Nov-2019 19:18:57.242 淇℃伅 [main] org.apache.catalina.startup.Catalina.start Server startup in 75 ms

Connected to server

[2019-11-21 07:18:57,743] Artifact icake:war exploded: Artifact is being deployed, please wait...

21-Nov-2019 19:18:58.461 淇℃伅 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�

[2019-11-21 07:18:58,510] Artifact icake:war exploded: Artifact is deployed successfully

[2019-11-21 07:18:58,510] Artifact icake:war exploded: Deploy took 767 milliseconds

21-Nov-2019 19:19:07.227 淇℃伅 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory 鎶妛eb 搴旂敤绋嬪簭閮ㄧ讲鍒扮洰褰� [E:\Apache\apache-tomcat-8.5.47\webapps\manager]

21-Nov-2019 19:19:07.273 淇℃伅 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�

21-Nov-2019 19:19:07.273 淇℃伅 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [E:\Apache\apache-tomcat-8.5.47\webapps\manager] has finished in [46] ms

21-Nov-2019 19:18:56.977 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.鏈嶅姟鍣ㄧ増鏈�:     Apache Tomcat/8.5.47

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄦ瀯寤�:            Oct 7 2019 13:30:46 UTC

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.47.0

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.鐗堟湰:               10.0

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏋舵瀯:                  amd64

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 鐜鍙橀噺:         C:\Program Files\Java\jdk1.8.0_101\jre

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 鐗堟湰:              1.8.0_101-b13

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.渚涘簲鍟�:            Oracle Corporation

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         E:\Apache\apache-tomcat-8.5.47

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\86176\.IntelliJIdea2019.2\system\tomcat\Unnamed_icake\conf\logging.properties

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

21-Nov-2019 19:18:56.992 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61764,suspend=y,server=n


正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学,你好!404是访问路径错误,找不到页面了。建议你按照如下步骤进行排查:

先试试http://localhost:8080/icake路径是否404,如果这个路径也是404,建议新建一个jsp文件,比如demo1.jsp,然后访问http://localhost:8080/icake/demo1.jsp,如果此时可以了,建议贴出你的报404错误的页面的截图,要包括url地址。

如果使用sout输出,其实是用System.out.println()语句进行输出,会在控制台打印输出结果。你现在是404错误,主要是访问路径的问题,暂时还不用调试,如果是内部错误再进行调试。

如果我的回答解决了你的疑惑,请采纳!祝学习愉快!

  • LLLL_ 提问者 #1
    现在是什么情况 ,我访问http://localhost:8080/icake,和其他地址 ,他不会跳转任何页面,是一个 空白的 一致在加载的页面 , 我设置的http://localhost:8080/icake_war/admin/Catalog/list.do 和老师的不一样 ,但老师的我也式过了 ,我收到回复,这已经是第二天了,如果下一个回复还有没好的解决办法,我还怎么往下学,我不想这么的耽误时间,我希望能尽快度过这个错误!!!!因为 这次项目练习,之前没有过一次测试,一直讲啊讲,根本不知道从哪查起,控制台也不报错 ,你光说 404是怎么回事 哪些简单的办法 我都百度了 我都试过了 !!!
    2019-11-22 11:00:14
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师