Tomcat 7, servlet not found
I know this thread is similar to others in the forum, but none of them give me the clue to solve this issue:
I have a JAVA application developed using JSP and servlets. This app works properly when deployed to my local Tomcat 7 instance, but a 404 (not found) is returned every time I try to access the servlets.
.class files are properly stored under the public_html/WEB_INF/classes folder, and JSPs as well as JAVA tags and the rewriting module are working as expected.
In other threads I have seen that I have to store the servlets under "public_html/servlets" folder, but the question is: what do I have to save?: .class files, web.xml,...
This is the web.xml content regarding servlet mappings:
I appreciate any help before considering another server options.
Login
com.hmz.web.xhr.Login
LoginFacebook
com.hmz.web.xhr.LoginFacebook
LoginGoogle
com.hmz.web.xhr.LoginGoogle
RecoverPassword
com.hmz.web.xhr.RecoverPassword
Register
com.hmz.web.xhr.Register
UpdatePassword
com.hmz.web.xhr.UpdatePassword
UpdateProfile
com.hmz.web.xhr.UpdateProfile
Login
/xhr/login
LoginFacebook
/xhr/login-facebook
LoginGoogle
/xhr/login-google
RecoverPassword
/xhr/recover-password
Register
/xhr/register
UpdatePassword
/xhr/update-password
UpdateProfile
/xhr/update-profile
I appreciate any help before considering another server options.
-
Hello, Did you check the catalina error logs when the URL returns 404 error ? May be you have not deployed the app to proper location ? 0 -
It's difficult for me to see the logs because I have no access to the apache/tomcat path, just to my app folder (I have to ask the reseller to send that file to me). I'm going to enumerate the steps I have done to publish the application for you to see if there's something wrong/missing: 1.- Deploy the WAR to my local tomcat installation inside the "webapps" folder. I have checked out that all servlets and JSPs are working properly. 2.- Remove all the content under the "public_html" folder. 3.- Upload the contents of my application folder under my local tomcat to the FTP (directly to the public_html). 4.- Create a .htaccess (I HAVE ONLY ONE .htaccess FILE) file with the following content, in order to have JSP and Rewrite module working: SetHandler jakarta-servlet SetEnv JK_WORKER_NAME ajp13 Is there anything I have missed?, do I need another .htaccess inside the WEB_INF folder, and what are its contents?. 0
Please sign in to leave a comment.
Comments
3 comments