Error running web project in eclipse
- by DarkKnight
I am a newbie to servlets. I created a dynamic web project in eclipse. I have following files in my project
home.html
validateServlet.java
I have defined validated servlet as an action in home.html form. However when I run it, I get http status 404. Below is the hierarchy of my project
Project
Java Resources
src
com.servlets
ValidateServlet.java
build
WebContent
META-INF
WEB-INF
web.xml
hello.html
Contents of my web.xml are as follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web- app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Website</display-name>
<servlet>
<description></description>
<display-name>ValidateServlet</display-name>
<servlet-name>validate</servlet-name>
<servlet-class>com.oracle.coen235.servlets.ValidateServlet</servlet-class>
</servlet>
</web-app>
In my hello.html, action is specified as ,
What might be the issue? I guess I am not able to generate the class file for my servlet. Can anyone guide me through this problem?