This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse Dynamic web Project + Tomcat : Servlet deployment problem

 
moaad elamrani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody

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 :



the form calls a servlet :

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;



Finally, I edited the Deployment Descriptor web.xml




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

thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic