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/susimail/src/WEB-INF/web.xml

    rb9d5cdf r2aceca5  
    2424    </multipart-config>
    2525  </servlet>
     26
     27  <servlet>
     28    <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
     29    <servlet-class>net.i2p.servlet.ErrorServlet</servlet-class>
     30    <init-param>
     31      <param-name>name</param-name>
     32      <param-value>SusiMail</param-value>
     33    </init-param>
     34  </servlet>
     35
    2636  <servlet-mapping>
    2737    <servlet-name>SusiMail</servlet-name>
    2838    <url-pattern>/susimail</url-pattern>
    2939  </servlet-mapping>
     40
     41  <servlet-mapping>
     42    <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
     43    <url-pattern>/error</url-pattern>
     44  </servlet-mapping>
     45
    3046  <session-config>
    3147    <session-timeout>1440</session-timeout>
     
    4965  </context-param>
    5066
    51 <!--
    52      Jetty 6 mulipart form handling
    53      See http://docs.codehaus.org/display/JETTY/File+Upload+in+jetty6
    54      and RequestWrapper.java.
    55      Unused because it doesn't support content-type until Jetty 8.
    56 
    57     <filter>
    58         <filter-name>fileuploadfilter</filter-name>
    59         <filter-class>org.mortbay.servlet.MultiPartFilter</filter-class>
    60         <init-param>
    61             <param-name>deleteFiles</param-name>
    62             <param-value>true</param-value>
    63         </init-param>
    64     </filter>
    65 
    66     <filter-mapping>
    67         <filter-name>fileuploadfilter</filter-name>
    68         <url-pattern>/susimail</url-pattern>
    69     </filter-mapping>
    70 -->
     67  <error-page>
     68    <error-code>403</error-code>
     69    <location>/error</location>
     70  </error-page>
     71  <error-page>
     72    <error-code>404</error-code>
     73    <location>/error</location>
     74  </error-page>
     75  <error-page>
     76    <error-code>500</error-code>
     77    <location>/error</location>
     78  </error-page>
    7179
    7280</web-app>
Note: See TracChangeset for help on using the changeset viewer.