zoukankan      html  css  js  c++  java
  • jetty配置400出错页面信息

    jetty配置服务器400出错信息配置:

    文件名:jetty/etc/jetty-webdefault.xml

    1. 修改 jetty-webdefault.xml 添加配置信息.
    
    <error-page>
    
        <errpr-code>400</error-code>
    
        <location>/err400.html</location>
    
    </error-page>
    
    <error-page>
    
        <errpr-code>404</error-code>
    
        <location>/err404.html</location>
    
    </error-page>
    
    2. 修改web应用项目的对应位置如 /webapp/ 添加如下页面.
    /err400.html /err404.html

    jetty配置服务器404禁止显示war包地址和服务器版本等

    jetty.xml
    增加: 禁止显示安装包地址
        <Ref id="DefaultHandler">
           <Set name="showContexts">false</Set> 
        </Ref>
    修改:true 改为false    禁止显示版本信息
        <Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="false" /></Set>
          
    webdefault.xml 
    修改:true改为false   禁止目录访问
        <init-param>
          <param-name>dirAllowed</param-name>
          <param-value>false</param-value>
        </init-param>
    
  • 相关阅读:
    模板模式创建一个poi导出功能
    vim python和golang开发环境配置
    vim快捷键
    golang聊天室
    goroutine与channels
    Redis中的GETBIT和SETBIT(转载)
    二叉树
    满二叉树与完全二叉树
    拓扑排序
    ZigZag Conversion
  • 原文地址:https://www.cnblogs.com/kelelipeng/p/15736421.html
Copyright © 2011-2022 走看看