-
1. Re: Wildfly-13/15, display error page when JSP page not found
jaikiran Mar 5, 2019 7:42 AM (in response to andrecouture)What does your web.xml file look like, for this application?
-
2. Re: Wildfly-13/15, display error page when JSP page not found
andrecouture Mar 5, 2019 7:58 AM (in response to jaikiran)Here it is, I h ave removed some sections that I are kinda repetitive...
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<distributable/>
<display-name>My Server</display-name>
<filter>
<filter-name>SecurityFilter</filter-name>
<filter-class>com.xxxxxx.server.web.filter.SecurityFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
<servlet-name>action</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter>
<filter-name>PortalFilter</filter-name>
<filter-class>com.xxxxxx.server.web.filter.PortalFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PortalFilter</filter-name>
<url-pattern>/portal/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>WebPlayerFilter</filter-name>
<filter-class>com.xxxxxx.server.web.filter.WebPlayerFilter</filter-class>
</filter>
...
<filter>
<filter-name>PartnerFilter</filter-name>
<filter-class>com.xxxxxx.server.web.filter.PartnerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PartnerFilter</filter-name>
<url-pattern>/admin/login/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>PartnerFilter</filter-name>
<url-pattern>/admin/</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>PartnerFilter</filter-name>
<url-pattern>/admin</url-pattern>
</filter-mapping>
<filter>
<filter-name>DBFilter</filter-name>
<filter-class>com.xxxxxx.server.common.struts.DBFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>DBFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter>
<filter-name>DBFilter2</filter-name>
<filter-class>com.xxxxxx.server.common.struts.DBFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>DBFilter2</filter-name>
<url-pattern>/webservices/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.xxxxxx.server.portal.SessionListener</listener-class>
</listener>
<servlet>
<servlet-name>apiTZ</servlet-name>
<servlet-class>com.xxxxxx.server.common.TimeZoneInitServlet</servlet-class>
<init-param>
<param-name>timeZone</param-name>
<param-value>GMT</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>serverstatus</servlet-name>
<servlet-class>com.xxxxxx.server.common.util.ServerStatusReporterServletWithJNDIConnection</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config-portal.xml,/WEB-INF/struts-config-api.xml,/WEB-INF/struts-config-admin.xml,/WEB-INF/struts-config-stat.xml,/WEB-INF/struts-config-esl.xml</param-value>
</init-param>
<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>serverstatus</servlet-name>
<url-pattern>/admin/status</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
...
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>401</error-code>
<location>/admin/errors/error401.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/admin/errors/error403.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/admin/errors/error404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/admin/errors/error.jsp</location>
</error-page>
<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<session-config>
<session-timeout>10</session-timeout>
<cookie-config>
<!--<path>/</path>-->
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
...
<jsp-config>
<taglib>
<taglib-uri>http://jsptags.com/tags/navigation/pager</taglib-uri>
<taglib-location>/WEB-INF/pager-taglib.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
-
3. Re: Wildfly-13/15, display error page when JSP page not found
jaikiran Mar 6, 2019 1:28 AM (in response to andrecouture)Based on that web.xml :
<error-page>
<error-code>401</error-code>
<location>/admin/errors/error401.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/admin/errors/error403.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/admin/errors/error404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/admin/errors/error.jsp</location>
</error-page>
If any of the above error codes are thrown by the web server, then the application will be redirected to the specified locations. What HTTP status code is being returned in the case where you aren't seeing these error pages?
-
4. Re: Wildfly-13/15, display error page when JSP page not found
andrecouture Mar 6, 2019 11:37 AM (in response to jaikiran)Hi
Actually I get a blank page with no errors and no body.
URL example
https://xxx.com/admin/css/badpage.jsp
There are no jsp pages at that location
/André
-
5. Re: Wildfly-13/15, display error page when JSP page not found
jaikiran Mar 10, 2019 8:18 AM (in response to andrecouture)In your web.xml there are certain filters that are applied for *.jsp. You will have to check which of those filters (if any) might be returning this 200 status code.