Ignore:
Timestamp:
Mar 14, 2018 6:33:14 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
00dc1ed
Parents:
b9d5cdf
Message:

Console: Add error handler to all webapps (ticket #2155)
Fix up default servlet handling in i2ptunnel and susidns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/susidns/src/WEB-INF/web-template.xml

    rb9d5cdf r2aceca5  
    2828      <servlet-name>i2p.susi.dns.TranslateSVGServlet</servlet-name>
    2929      <servlet-class>i2p.susi.dns.TranslateSVGServlet</servlet-class>
     30    </servlet>
     31
     32    <servlet>
     33      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
     34      <servlet-class>net.i2p.servlet.ErrorServlet</servlet-class>
     35      <init-param>
     36        <param-name>name</param-name>
     37        <param-value>Addressbook</param-value>
     38      </init-param>
    3039    </servlet>
    3140
     
    6574
    6675    <servlet-mapping>
     76        <servlet-name>i2p.susi.dns.jsp.index_jsp</servlet-name>
     77        <url-pattern>/index.html</url-pattern>
     78    </servlet-mapping>
     79
     80    <servlet-mapping>
     81        <servlet-name>i2p.susi.dns.jsp.index_jsp</servlet-name>
     82        <!-- empty pattern handles the root -->
     83        <url-pattern></url-pattern>
     84    </servlet-mapping>
     85
     86    <servlet-mapping>
    6787        <servlet-name>i2p.susi.dns.jsp.export_jsp</servlet-name>
    6888        <url-pattern>/export</url-pattern>
     
    7292      <servlet-name>i2p.susi.dns.TranslateSVGServlet</servlet-name>
    7393      <url-pattern>/images/*</url-pattern>
     94    </servlet-mapping>
     95
     96    <servlet-mapping>
     97      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
     98      <url-pattern>/error</url-pattern>
    7499    </servlet-mapping>
    75100
     
    84109    </welcome-file-list>
    85110
     111    <error-page>
     112        <error-code>403</error-code>
     113        <location>/error</location>
     114    </error-page>
     115    <error-page>
     116        <error-code>404</error-code>
     117        <location>/error</location>
     118    </error-page>
     119    <error-page>
     120        <error-code>500</error-code>
     121        <location>/error</location>
     122    </error-page>
     123
    86124</web-app>
Note: See TracChangeset for help on using the changeset viewer.