I found only related topic for c# please don’t blame me if I missed the resource.
It looks something like
/project/blablaentered and content with 404.
Effectively I just want to specify my own page when 404 page is thrown.
My security xml:
<security:http auto-config="true" use-expressions="true" >
<security:form-login login-processing-url="/static/j_spring_security_check" login-page="/login" authentication-failure-url="/login?login_error=t" default-target-url="/home"/>
<security:intercept-url pattern="/home" access="isAuthenticated()" />
<security:intercept-url pattern="/home/try" access="hasRole('ROLE_EDITOR')"/>
<security:access-denied-handler error-page="/accessDenied"/>
</security:http>
UPDATE: Please follow for solution: Custom 404 using Spring DispatcherServlet
The simplest way is probably enable an
error-pageelement insideweb.xmlas long as you don’t mind it being a plain JSP (ie, no controller). This way, URLs outside yourDispatcherServletwhich will generate a 404 from your servlet container will follow the same path as any URL that Spring is unable to map to a controller based on your configuration.If this isn’t good enough, you can define a
@Exceptionmethod for a particular controller, or use aHandlerExceptionResolver.