• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

errors!!

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai guys,
I have my java in C:\s1studio_jdk\j2sdk1.4.1_02
java and javac are working fine.
I have my tomcat in c
when i tried to compile the program I am getting the following errors.
my program is in first folder.
so,
C:\>cd first
C:\first>javac HelloWorld11.java
HelloWorld11.java:4: package javax.servlet does not exist
import javax.servlet.*;
^
HelloWorld11.java:5: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloWorld11.java:7: cannot resolve symbol
symbol : class HttpServlet
location: class HelloWorld11
public class HelloWorld11 extends HttpServlet {
^
HelloWorld11.java:9: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorld11
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
HelloWorld11.java:9: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorld11
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
HelloWorld11.java:10: cannot resolve symbol
symbol : class ServletException
location: class HelloWorld11
throws IOException, ServletException
^
6 errors
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add servlet.jar to the classpath.
It should be under <TOMCAT_HOME>\common\lib
The servlet API is not part of standard J2SE.
 
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic