Where should I put Classes and Deployment Descriptor of a website hosted on a linux server?
I have registered and hosted my JSP/Servlet based website on a Linux Server. I access that via CPanel. It shows me public_html directory. I want to as where should I put classes and deployment descriptor for my servlets? Thanks..
@William –
Tomcat is installed on the server. i can confirm the only problem is that i am not able to access class files or even jsps that i have placed in /public_html/www or /public_html/www/WEB-INF/classes folder.
I dont have access to shell account, etc. I just have access to CPanel. so echo $CATALINA_HOME wont be possible i am afraid.
I have talked to the support they said: "You should place your JSP files in public_html/web_inf/JSP folder and place servlets,BEANS and java class files in public_html/web_inf/class folder." that I have but accessing those jsps (placed there) gives 404 error.
Sounds like you need to have the Tomcat server software running on that Linux server. You need to put your files under the "webapps" subdirectory that is under the Tomcat directories. If you have command line access, try giving the command
echo $CATALINA_HOME
That will show you where the top of the Tomcat tree is.
The best thing really would be to talk to the support people for that Linux server. It is possible that it is not set up to handle JSP and Servlets, but only HTML. In any case, they should be able to tell you where to put your files.
————
Have you tried these types of URLs:
http://yourwebsite/web-inf/JSP/x.jsp
(of course, replace the "yourwebsite" and the "x" with the names you really have)
http://yourwebsite:8080/x.jsp
Also, if you enabled email on your Answers account, I could email you. Or, you could email me by going to my account. Then we could resolve this and post the answer here.
|
Sounds like you need to have the Tomcat server software running on that Linux server. You need to put your files under the "webapps" subdirectory that is under the Tomcat directories. If you have command line access, try giving the command
echo $CATALINA_HOME
That will show you where the top of the Tomcat tree is.
The best thing really would be to talk to the support people for that Linux server. It is possible that it is not set up to handle JSP and Servlets, but only HTML. In any case, they should be able to tell you where to put your files.
————
Have you tried these types of URLs:
http://yourwebsite/web-inf/JSP/x.jsp
(of course, replace the "yourwebsite" and the "x" with the names you really have)
http://yourwebsite:8080/x.jsp
Also, if you enabled email on your Answers account, I could email you. Or, you could email me by going to my account. Then we could resolve this and post the answer here.
References :