After upgrade to Tomcat 7 servlets stopped working

JohnSmith

Member
Oct 22, 2003
5
0
151
I recently upgraded through EasyApache Tomcat from 5.5 to 7 and servelts stopped working. The jsp files are working. It seems as if tomcat doesn't see the WEB-INF directory. (It's in /home/username/public_html/WEB-INF )

I've upgraded because it said that Tomcat 5.5 is no longer supported so I feared of possible vulnerabilities found.

What should I do about it?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello :)

Does the issue persist after restarting Tomcat? Do you notice any particular errors or warnings in the /var/log/easy-tomcat7/catalina.err log file?

Thank you.
 

ScottTh

Well-Known Member
Jan 28, 2013
157
2
18
Houston, TX
cPanel Access Level
Root Administrator
I recently upgraded through EasyApache Tomcat from 5.5 to 7 and servelts stopped working. The jsp files are working. It seems as if tomcat doesn't see the WEB-INF directory. (It's in /home/username/public_html/WEB-INF )

I've upgraded because it said that Tomcat 5.5 is no longer supported so I feared of possible vulnerabilities found.

What should I do about it?
Hello,

Have you consulted our Tomcat migration documentation?

That documentation has a section about reinstalling and re-enabling user servlets.

If you are still having issues after reading the Tomcat documentation, please feel free to open a ticket with our support staff so you can get your sites back up and running.

Thank you!
 

JohnSmith

Member
Oct 22, 2003
5
0
151
Hello :)

Does the issue persist after restarting Tomcat? Do you notice any particular errors or warnings in the /var/log/easy-tomcat7/catalina.err log file?

Thank you.
Yes the issue persist after restarting Tomcat, also I've reenabled servlets for that user and restarted Tomcat one more time without results.

In cataline.err there are no significant errors (at least which I observed) but it shows:
INFO: Deploying web application directory /home/username/public_html/cgi-bin
...
INFO: Deploying web application directory /home/username/public_html/images

There are no WEB-INF or public_html added. I've tried to move WEB-INF to cgi-bin folder without any results.

Let's give it a few more tries before opening ticket.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Ensure you post the ticket number here should you decide to open a ticket so we can update this thread with the outcome.

Thank you.
 

JohnSmith

Member
Oct 22, 2003
5
0
151
Ensure you post the ticket number here should you decide to open a ticket so we can update this thread with the outcome.

Thank you.
The ticket number is 5392127

BTW: Where should I put the war file so it will be autodeployed by the new Tomcat 7? (in public_html or in root user folder?)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
To update, the index.jsp page and a test JSP page were confirmed as working well, indicating servlets are functioning. It looks like the issue is isolated to the individual script that's uploaded to the account. WAR files are referenced here:

WAR File Deployment

Thank you.
 

JohnSmith

Member
Oct 22, 2003
5
0
151
To update, the index.jsp page and a test JSP page were confirmed as working well, indicating servlets are functioning. It looks like the issue is isolated to the individual script that's uploaded to the account.
No it doesn't, recently I've found out that servlets work on 8080 port, but don't work through Apache.
 

JohnSmith

Member
Oct 22, 2003
5
0
151
Update: it was fixed by CPanel support, by adding:

SetHandler jakarta-servlet
SetEnv JK_WORKER_NAME ajp13

to .htaccess
 
Last edited: