This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Tomcat and the fly likes running simple servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "running simple servlet" Watch "running simple servlet" New topic

running simple servlet

arekonda ramesh babu
Ranch Hand

Joined: Apr 11, 2006
Posts: 35

iam getting the compilation error:: 1.javax.servlet not found

while compiling under c:\project\src\javac

i set classpath ,path,java_home as follows
class path:
C:\bea\jdk142_08\lib;C:\Program Files\Apache Software Foundation\Tomcat 5.0\server\lib;C:\Sun\AppServer\lib;C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib;

C:\Sun\AppServer\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ntutils;C:\Scripts;C:\bea\jdk142_08\bin;C:\Program Files\Perforce;D:\Profiles\frhq87\Desktop\apache-ant-1.6.5\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin;


C:\Program Files\Java\jdk1.5.0_09
Kai Witte
Ranch Hand

Joined: Jul 17, 2004
Posts: 356

the common/lib contains only jars, so it does not help to include that in the classpath. What you need is servlet.jar or servlet-api.jar (version dependent) inside the common/lib.


Kai Witte's business website Kai Witte's private homepage
arekonda ramesh babu
Ranch Hand

Joined: Apr 11, 2006
Posts: 35
God sends Reply in the form of

Kai Witte

i can only acknowledge with the above as i put 5 valuable hours and in vain

to identify what went wrong

I agree. Here's the link:
subject: running simple servlet
It's not a secret anymore!