Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can't compile servlet

 
Fred Close
Ranch Hand
Posts: 42
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've got a strange problem
I have copied the servlet.jar to my jdk_home\lib\ext directory (there was no ext directory, I had to create it)
but I still can't compile a servlet, I have the following error
package javax.servlet does not exist
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
"all" what you need is to add the following to your classpath:
tomcat_home\lib\servlet.jar
Regards,
 
Fred Close
Ranch Hand
Posts: 42
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understood that it is possible to place jar files in the
java\lib\ext directory and so they will be accessible ???
Am I wrong ?
 
Fred Close
Ranch Hand
Posts: 42
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

MEA CULPA, MEA MAXIMA CULPA
I placed servlet.jar under jdk1.3\lib\ext
but it's under
jdk1.3\jre\lib\ext
that I have to place it
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ultimatly, you can place the jar files anywhere, AS LONG AS they are in your classpath while compiling and running.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic