• 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

servlet compilation

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I downloaded JDK 1.3.1 from Sun's website and I would like to write and compile Java servlets. How should I set up the development environment on my local PC so I can compile servlets? Right now I wrote a HelloWorldServlet and it gave me this error:
^
HelloWorldServlet.java:7: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorldServlet
public void doGet(HttpServletRequest req,
^
HelloWorldServlet.java:7: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorldServlet
public void doGet(HttpServletRequest req,
HelloWorldServlet.java:8: cannot resolve symbol
symbol : class ServletException
location: class HelloWorldServlet
throws ServletException, IOException
^
6 errors
I downloaded the Servlet API from Sun also, but I can't understand why this is happening? I also changed my CLASSPATH statement. What am I doing wrong?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will also need a servlet "engine" or container in order to run servlets locally. The recommended one is Tomcat - download from the jakarta.apache.org web site. The Tomcat instructions should explain which jar file goes where.
Bill
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go to the following URL: http://webappcabaret.com/javachina/tomcathowto.htm
Regards,
Jimi.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Install some jws or tomcat servers on your system then set classpath accordinglingly
http://www.cyberdosti.com

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad Im not nuts... I just ran into the same problem, and answers to these questions can be so hard to find for people like me who are new to Java.
I"m new here -- thanks to all of you for providing this forum. I've recommended it to some other people I work with, who are also in the learning curve when it comes to Java, JSP, servlets, Tomcat, etc...
[This message has been edited by Kristy McClure (edited June 19, 2001).]
reply
    Bookmark Topic Watch Topic
  • New Topic