403 redirect to a page or service? Setting a default error template?

I have created a custom login service, now I need to specify a login page, is it possible to define a template that would display a login form when I get a 403 error on a resource?
Forbidden resource -> redirect to login page (login, password, redirectUrl) -> login service -response{redirect: redirectUrl}-> page

@tsi I really need help on this one: I want to display a login form when the page is reporting a 403 error.
Enonic is simply running:
com.enonic.xp.portal.impl.resource.base.BaseResource.forbidden(String, Object…)

Is there any way to register an error page or error handler?

Hi again!

To solve this properly I think you need a filtering capability which is not yet finished… It is scheduled for 6.0 as far as I know. @srs should know a lot more about this.

Maybe @rmy knows? But as mentioned, content types themselves are not indexed. Also, trying to understand how we use ES might be quite a job :smile:


Short answer to this is that you will need filter injection capailities, placing your own code in between the request and respons in a general fashion, this is ETA august.

Potentially you could try some trick in apache to handle this and do a redirect for you…