• 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

problem in compiling servlet

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I'm getting error when I'm compiling my servlet as......
Note: I'm using apache tomcat 5.5 and I have already set java_home,jre_home,and jdk path by environment variable
C:\Users\him\applications\Tomcat 5.5\webapps\BeerV1>javac classpath "Users\him\applications\Tomcat 5.5\common\lib\servlet-api.jar":. -d WEB-INF\classes\com\example\web\BeerSelect.java

src\com\example\web\BeerSelect.java:3: package javax.servlet does not exist
import javax.servlet.*;
^
src\com\example\web\BeerSelect.java:4: package javax.servlet.http does not exist

import javax.servlet.http.*;
^
src\com\example\web\BeerSelect.java:6: cannot find symbol
symbol: class HttpServlet
public class BeerSelect extends HttpServlet {
^
src\com\example\web\BeerSelect.java:7: cannot find symbol
symbol : class HttpServletRequest
location: class com.example.web.BeerSelect
public void doPost(HttpServletRequest request,HttpServletResponse respon
se) throws IOException,ServletException {
^
src\com\example\web\BeerSelect.java:7: cannot find symbol
symbol : class HttpServletResponse
location: class com.example.web.BeerSelect
public void doPost(HttpServletRequest request,HttpServletResponse respon
se) throws IOException,ServletException {
^
src\com\example\web\BeerSelect.java:7: cannot find symbol
symbol : class ServletException
location: class com.example.web.BeerSelect
public void doPost(HttpServletRequest request,HttpServletResponse respon
se) throws IOException,ServletException {

^
src\com\example\web\BeerSelect.java:10: cannot find symbol
symbol : variable out
location: class com.example.web.BeerSelect
out.println("Beer selection advice<br>");
^
src\com\example\web\BeerSelect.java:11: cannot find symbol
symbol : variable requset
location: class com.example.web.BeerSelect
String c = requset.getParameter("color");
^
src\com\example\web\BeerSelect.java:12: cannot find symbol
symbol : variable out
location: class com.example.web.BeerSelect
out.println("got beer color: "+c);

Plaease tell me the raeson of error


Thanks in advance..........









 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Compiling Servlets
 
It will give me the powers of the gods. Not bad for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic