• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet creation

 
John Campbell
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm quite new to servlets and have just started reading K&B's book on it. I was trying to create a servlet on my eclipse but it doesn't allow me to import the servlet package.

I have j2sdk1.5.0 installed on my machine. What else am I missing? please suggest.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get either download j2ee from Sun's site or, if you are using Tomcat, put servlet-api.jar on your classpath. It's under TOMCAT_HOME/common/lib
 
John Campbell
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Ben - I'm using Tomcat and could find servlet-api.jar as well but since I was using eclipse I never had to set the classpath before!! I tried setting it just now but its not working :-(

this is how I created the classpath environment variable:

variable name: CLASSPATH
variable value: C:\Program Files\Java\j2sdk1.5.0\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think with Eclipse, you add it as an "external jar" (somewhere from the projects menu).
 
John Campbell
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it!

cheers Ben
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic