• 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Help needed with Javax package  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arun10
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!