In the error page I would like to display the URL what the user requested.
In my web.xml:
&l
Here is a simple example of JSP error page that shows the error code and the URL of the requested page:
404.jsp:
<%@ page language="java" isErrorPage="true" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
Error page
404 Page Not Found.
Error code: ${pageContext.errorData.statusCode}
Request URI: ${pageContext.request.scheme}://${header.host}${pageContext.errorData.requestURI}
P.S.
The use of scriptlets inside JSP is highly discouraged. Read this post.