• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Can't find package javax.servlet.*;

 
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???
 
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??
 
Ranch Hand
Posts: 121
  • 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...=)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!