Hi,
I have a problem trying to set up tomcat to run a simple servlet and hope someone can help out.
I am trying to deploy/upload a Java based web application on Linux based shared Java hosting server. For this I have uploaded the war file on Cpanel, also I have created same file structure as it was in Tomcat.
I have created following structure in public_html directory of Cpanel:
-css
-html
-js
-jsp
-META-INF
----classes
----lib
----web.xml
-WEB-INF
-index.html
-Model.war
*All the classes are kept in classes folder inside web-inf.
Tomcat is running and the index page is visible. I have redirected from index.html page to jlogin.jsp page inside the jsp folder. It working fine with complete effect of css & images and all scripting working fine on jlogin page.
But when I am calling Login servlet from jlogin.jsp page it gives 404 NOT FOUND error. I have tried all possible path to call servlet, still problem persist.
Login.class servlet is located in : WEB-INF/classes/com/org/Model/servlets
ERROR is - 404
type Status report
message /Model/Login
description The requested resource (/Model/Login) is not available.
//web.xml follows (located in WEB-INF
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>Login</servlet-name>
<servlet-class>com.org.model.servlets.Login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Login</servlet-name>
<url-pattern>/Login</url-pattern>
</servlet-mapping>
</web-app>
Urgent help is required.
I have a problem trying to set up tomcat to run a simple servlet and hope someone can help out.
I am trying to deploy/upload a Java based web application on Linux based shared Java hosting server. For this I have uploaded the war file on Cpanel, also I have created same file structure as it was in Tomcat.
I have created following structure in public_html directory of Cpanel:
-css
-html
-js
-jsp
-META-INF
----classes
----lib
----web.xml
-WEB-INF
-index.html
-Model.war
*All the classes are kept in classes folder inside web-inf.
Tomcat is running and the index page is visible. I have redirected from index.html page to jlogin.jsp page inside the jsp folder. It working fine with complete effect of css & images and all scripting working fine on jlogin page.
But when I am calling Login servlet from jlogin.jsp page it gives 404 NOT FOUND error. I have tried all possible path to call servlet, still problem persist.
Login.class servlet is located in : WEB-INF/classes/com/org/Model/servlets
ERROR is - 404
type Status report
message /Model/Login
description The requested resource (/Model/Login) is not available.
//web.xml follows (located in WEB-INF
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>Login</servlet-name>
<servlet-class>com.org.model.servlets.Login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Login</servlet-name>
<url-pattern>/Login</url-pattern>
</servlet-mapping>
</web-app>
Urgent help is required.