【问题标题】:Apache Tomcat error: 404 page not found while the other jsp runs properlyApache Tomcat 错误:在其他 jsp 正常运行时未找到 404 页面
【发布时间】:2016-06-30 15:11:36
【问题描述】:

当我运行 sasas.html 时,它会给出 404 错误,而另一个 NewFile.jsp 运行正常。我已经尝试过重启服务器

【问题讨论】:

    标签: javascript hibernate spring-mvc tomcat web


    【解决方案1】:

    您好,您可以将html 代码作为JSP 页面运行。 重命名你的html页面的扩展名将sasas.html改成sasas.jsp..

    并将此指令添加到页面顶部:

    <%@ page language="java" contentType="text/html; charset=utf-8"
        pageEncoding="ISO-8859-1"%>
    

    之前:&lt;!DOCTYPE html&gt;

    【讨论】:

    • 谢谢,我也做了同样的事情......它工作但为什么会发生......??
    猜你喜欢
    • 1970-01-01
    • 2016-11-02
    • 2012-09-15
    • 1970-01-01
    • 2015-06-22
    • 1970-01-01
    • 2021-04-23
    • 1970-01-01
    • 2015-03-30
    相关资源
    最近更新 更多