• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling a servlet

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,

I was just trying to compile a servlet as suggested in the chapter 3 of HFS. But I am unable to compile the code. From the error messages I think that the compiler is not able to find the servlet-api.jar


The following is the command that I gave on the command prompt
javac - classpath /CATALINA_HOME/common/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java

When I execute the above command it gives me 4-5 errors & all errors are points towards HttpServlet, javax.servlet.* etc. Can you please help
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer the following questions:

1. What OS are you using?
2. Which version of java(JDK) have u installed?
3. Which version of tomcat have u installed?

we can help you provided you provide sufficient information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic