Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to compile servlet file  RSS feed

 
Akshayan Venkatesh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to compile servlet file

i am using jdk1.6.0_01
and j2eesdk 1.4 application server.

if i compile the servlet file it will throw an error

javax.servlet.http package not found.

i have set proper path & classpath

please help me to set the classpath & path .

thanks in advance
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include j2ee.jar in your classpath.
For example : javac -classpath c:/j2ee1.4/j2ee.jar MyServlet.java
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compiling servlets is no different than compiling any other Java class that has dependencies.

We have a FAQ entry on this here.

I'm going to move this to our Java In General (Beginner) where classpath and javac issues are discussed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!