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/i2ptunnel/jsp/web.xml

    rb9d5cdf r2aceca5  
    1414    </filter-mapping>
    1515
     16    <servlet>
     17      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
     18      <servlet-class>net.i2p.servlet.ErrorServlet</servlet-class>
     19      <init-param>
     20        <param-name>name</param-name>
     21        <param-value>Hidden Services Manager</param-value>
     22      </init-param>
     23    </servlet>
     24
    1625    <!-- precompiled servlets -->
    1726
     
    1928    <servlet-mapping>
    2029        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
    21         <!-- this becomes the default so it also covers /index and /index.html -->
    22         <url-pattern>/</url-pattern>
     30        <!-- empty pattern handles the root -->
     31        <url-pattern></url-pattern>
     32    </servlet-mapping>
     33
     34    <servlet-mapping>
     35        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
     36        <url-pattern>/index</url-pattern>
     37    </servlet-mapping>
     38
     39    <servlet-mapping>
     40        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
     41        <url-pattern>/index.html</url-pattern>
    2342    </servlet-mapping>
    2443
     
    3857    </servlet-mapping>
    3958
     59    <servlet-mapping>
     60      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
     61      <url-pattern>/error</url-pattern>
     62    </servlet-mapping>
     63
    4064    <!-- this webapp doesn't actually use sessions or cookies -->
    4165    <session-config>
     
    5175        <welcome-file>index.jsp</welcome-file>
    5276    </welcome-file-list>
     77
     78    <error-page>
     79        <error-code>403</error-code>
     80        <location>/error</location>
     81    </error-page>
     82    <error-page>
     83        <error-code>404</error-code>
     84        <location>/error</location>
     85    </error-page>
     86    <error-page>
     87        <error-code>500</error-code>
     88        <location>/error</location>
     89    </error-page>
    5390</web-app>
Note: See TracChangeset for help on using the changeset viewer.