Hello, I am a Java newbie & I have started with servlets. When I am trying to compile my servlet code,it says package javax.servlet & package javax.servlet.HttpServlet not found in import.My javax is in windows\desktop\.. & jdk is in c:\.Is it becuse of this the problem is arising.Where should the javax direcory be placed. Anyone of you please help
Hey Arun Please install JDK and Java Web Server properly and set path and classpath to it. E.g: After installing your directories will be like this : c:\jdk1.2 ------------ for Java c:\javawebserver2.0 --- for Java Web Server Set your path to c:\jdk1.2\bin;c:\javawebserver\bin;%path%; Your classpath to c:\jdk1.2\lib;c:\javawebserver2.0\lib\servlet.jar;.;%classpath%; This will solve your problem. Suneel
[This message has been edited by Suneel Setlur (edited January 22, 2001).]
"Arun10", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements. Thanks.
Hey Arun, Just makesure your classpath is correct and the javax files are visible for successful compilation. You have to make sure that till javax directory you have to include all the directory levels in the classpath. for example if javax directory is in C:\jakarta-servletapi-3.2\jakarta-servletapi-3.2\src; then you have to to include above one in the classpath variable.. good luck.
posted 18 years ago
Hello Sunil & Chandra Raju Thank you very much for the help offered.I am on my way to learn servlets. & I will change my user name to the required convetion(TO Frank caver) Thanks again Arun