How are you adding the servlet jar file to the classpath during compilation? The servlet classes are part of JEE, not JSE, so in this regard it makes no difference whether you're using Java 1.4 or Java 5.
Ping & DNS - updated with new look and Ping home screen widget
Joined: Feb 04, 2009
Before i did not add servlet jar.when i useing java 1.5.
But now i add servlet jar also in lib folder.
in same project with j2sdk1.4.2
Now i get package javax.servlet does not exist this error.
Please help me.....
Joined: Mar 22, 2005
How are you compiling? No directories (called "lib" or otherwise) are added automatically to the classpath during compilation when using "javac".
The directory structure doesn't matter if the jar file is not added to the classpath.
I'll ask again: How are you compiling the class? Post the complete command you're typing in, along with the directory in which you're executing it.
By the way, you can't use the [img] tag to link to files that are on your local desktop. You need to upload them to a public server, or use the "Attachments" option during posting.