samedi 23 septembre 2017

servlet not found error in cPanel godaddy.com

I'm having an already registered domain name on godaddy.com such as www.example.com(for example) and having a cPanel account. I've deployed my project's .war file and uploaded it into cPanel and then extracted it. When I access my domain(www.example.com), initial index.jsp file is getting loaded and all the javascript files work perfectly. But when it has to raise an AJAX request from javascript file, It says '404 error. Servlet not found!'. Well my servlet and class files are under Public_html/WEB-INF/classes/com/Fb/FaceBookServlet.java folder and here is my web.xml file

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>FaceBookServlet</servlet-name>
<servlet-class>com.Fb.FaceBookServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FaceBookServlet</servlet-name>
<url-pattern>/FaceBookServlet</url-pattern>
</servlet-mapping>

Important thing is "It works well in eclipse and doesn't when it comes to online" .... Please help me solve this

enter image description here

Here is the structure




Aucun commentaire:

Enregistrer un commentaire