• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Compile Error - J2EE 1.4 SDK

 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have installed J2EE 1.4 SDK and I'm trying to compile the servlet file, but it's showing the compile time error's 1.Package javax.servlet.http does not exist and 2.cannot resolve symbol. I think I didn't set path correctly, can any one help me out and give me the possible way to compile the servlets.If the problem is with the path, please give me the details for setting the path.
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This error depends in which environment you are compiling the servlet. Many free IDE's need to know where you've placed the jar-files containing the classes you're using. For example, under Eclipse the classpath variables can be viewed with the menu options Windows - preferences - Java.

If you're using another IDE or even if you're using a DOS box, then it will be different. So, in which environment are you compiling your servlets ?
 
author & internet detective
Posts: 42173
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sri,
In particular, you need to put one of servlets.jar or j2ee.jar in your classpath. This can be done as a command line switch or in the CLASSPATH environment variable.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also copy one of the above mentioned jar files to "your jdk directory\jre\lib\ext\"
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic