cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Cancelled authentication results in Tomcat default 401 error page

ptc-5248454
5-Regular Member

Cancelled authentication results in Tomcat default 401 error page

It seems that ThingWorx application does not handle any standard HTTP errors. Unauthorized access results in Tomcat default 401 error page. Invalid URL results in tomcat 404 error. 

Please advise if there is a specific configuration that can be added to override the default page.  


 

Note: Standard tomcat error handling cannot be added to the <tomcat>/conf/web.xml because it breaks Thingworx application.  


Followup: 

One way this could be accomplished is by adding the following to Thingworx web.xml file. Though there might be a better way to handle errors. 

  <error-page>

    <error-code>400</error-code>

    <location>/index.html</location>

  </error-page>

  <error-page>

    <error-code>401</error-code>

    <location>/index.html</location>

  </error-page>

  <error-page>

    <error-code>402</error-code>

    <location>/index.html</location>

  </error-page>

  <error-page>

    <error-code>403</error-code>

    <location>/index.html</location>

  </error-page>

  <error-page>

    <error-code>404</error-code>

    <location>/index.html</location>

  </error-page>

  <error-page>

    <error-code>500</error-code>

    <location>/index.html</location>

  </error-page>

 

0 REPLIES 0
Top Tags