This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't find package javax.servlet.*;

 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does not exist.
I can run and compile normally but can't find any servlet package.
I am running version:

java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2
Java HotSpot(TM) Client VM (build 1.4.2_04-b04, mixed mode)

I have JAVA_HOME set to c:/Sun/AppServer/JDK

What have I missed???
 
Me
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add servlet.jar to your CLASSPATH
 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where`? How do you mean??
 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I only have a file called imqservlet.jar at C:\Sun\AppServer\imq\lib is this the one you mean? I tried to set Claspath = this but it didn't help.
Am I missing the Servlet.jar file or ???
 
Me
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Patrik Nilsson:
Where`? How do you mean??


The same way you set
JAVA_HOME to c:/Sun/AppServer/JDK



At first you have to find servlet.jar on your system.

This is what I have set on Windows XP and Tomcat

CATALINA_HOME=C:\jakarta-tomcat-5.0.24
CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\common\lib\servlet.jar
 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I searched for the file servlet.jar, it doesn't exist.
Shouldn't the package be in this version?

Maybe I have a corrupt version or sth? I don't know. My last chanse is to downloadad a new version or is it possible to download only servlet.jar from somewhere??
 
Roger Yates
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patrik,

Mine is called servlet-api.jar, and is in the common/lib directory underneath the tomcat directory.

Try looking for that!
 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mine too...
Thanx a lot, both of you!!!
Now I can write My BeerServlets...=)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic