• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

problem in compiling servlet  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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: 21502
96
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compiling Servlets
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!