I'm using Eclipse Helios IDE
I have created a Dynamic Web application called : "first_appli". However I've noticed that the structure of the Web application is little bit weird.
In fact, the folder "classes" which is usually a subfolder of WEB-INF does not exist. Instead the "*.class" files are in folder called build in the "first_appli" directory.
I made a simple program : a form.html which calls a servlet.java servlet
I started by creating the form.html which is the welcome page :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> Beer Form </title>
<h1 align="center">Beer Selection Page</h1>
<form method="post" action="/servlet">
Select beer characteristics<p>
<select name="color" size="1">
<option value="light"> light </option>
<option value="amber"> amber </option>
<option value="brown"> brown </option>
<option value="dark"> dark </option>
The servlet.java is in the default folder within src folder in the Java_Ressources folder.
Logically, the <servlet-name> tag point to the class file and not the source file ( correct me!!) . Therefore, the fact that the servlet.class is hidden in the build folder surely will matter.
In order to overcome this problem, I tried to create a "classes" subfolder in WEB-INF and put servlet.class in it ==> KO not working
I've put the servlet.class directly in the WEB-INF ==> KO still not working
COULD YOU PLEASE HELP, It's been 2 days since I'm stuck here
Your web.xml file also not correct. for ex ReadExcel.java is a servlet class.
<servlet-class>com.xx.excel.ReadExcel</servlet-class> // com.xx.excel is a package name.