It's all about the answers!

Ask a question

How do I configure a custom error 500 page in CCM running WAS Liberty?


Mark Meiller (113) | asked Dec 14 '18, 12:00 p.m.
edited Dec 14 '18, 3:10 p.m. by Rosa Naranjo (2.9k11623)
Hello,
I am trying to create a custom error 500 page in the CCM application where any 500 error generated from that app will be redirected to said custom page.  I think code needs to be added to the CCM's 'web.xml' file that points to my custom page (created in HTML format for example), but I have not been successful and it appears the redirect cannot find my custom HTML page.  Not sure where it should go in the local installed directory, or is that's even the issue...? 
Here's the code I added to the CCM app's 'web.xml':
<error-page>
<error-code>500</error-code>
<location>/html/error500.html</location>
</error-page>
And then placed my custom HTML page here in the locally installed CCM.war directory:
\IBM\JazzTeamServer\server\liberty\servers\clm\apps\ccm.war\html\error500.html
On a related note, the below code for error 403 already existed out of the box in the web.xml, but I have no idea where "/auth/error403" is even located or is that is a file?  I can't find it anywhere in the directories.
<error-page>
<error-code>403</error-code>
<location>/auth/error403</location>
</error-page>
Any help would be much appreciated!!  Thank you!
Mark

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Dec 17 '18, 5:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I would suggest to search the internet or ask ina WAS Liberty forum.


In general ccm.war runs on the server and has the context root https://server:port/ccm
So /auth/error403  refers to the URL  https://server:port/ccm/auth/error403 which is likely a servlet.

Just my layman thoughts: /html/error500.html refers to https://server:port/ccm/html/error500.html which is not there. I am also wondering if you should even touch the web inf. I would expect you could do something like that on a higher level such as the server.xml.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.