Getting 404 error to “jsp” pages, even though Tomcat was auto-configured by [WHM/cPanel] installation


Visited 416 times, 1 so far today Dedicated Server Hosting, Linux VPS Hosting Add comments

Error
Apache Web Server was not passing servlet requests to Apache Tomcat. It served 404 errors to jsp pages, even though the Apache Tomcat was auto-configured by the WHM / Cpanel installation.

SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base ççç does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)

Cause
This was occurring because Tomcat could not read from the “public_html” directory for the site. This was a result of file protect being enabled in easyapache. This option causes all public_html directories to be owned by the user and the group nobody, leaving all other users unable to index those directories. Unfortunately this leaves tomcat, which runs as the user tomcat, unable to access those files as well.

Solution
It should be addressed by executing following script.

/scripts/disablefileprotect

Restart Tomcat service

/scripts/restartsrv_tomcat

Issue Fixed, now “jsp” pages works fine.

Enjoy :)

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in