Can the portal's HTTP error pages be customised?

1
0
-1

Hi,

Can the portal's HTTP error pages be customised?

  • webapps/bonita/error-pages/403.jsp
  • webapps/bonita/error-pages/404.jsp
  • webapps/bonita/error-pages/500.jsp

And if so, could the user's profile/id/... be retrieved in order to customise the error message?

Thanks for your help,

Unai

1 answer

1
+1
-1
This one is the BEST answer!

Hello Unai,
the only way to customize those pages is to modify them in bonita.war, or add new ones and declare them in the web.xml file (still in bonita.war).
being JSP files, you can use java code in them to call the java API.
The APISession needed to call the engine API can be retrieved in the HTTP session like this:

<%@page language="java"%>
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="org.bonitasoft.engine.session.APISession"%>
<%
    APISession apiSession = session.getAttribute("apiSession")
the rest of your code...


HTH

Comments

Submitted by unai.gaston.caminos on Fri, 11/27/2020 - 18:00

That's perfect.

Thanks a bunch, Anthony!

Notifications