This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Servlet program using command prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic

Servlet program using command prompt

Swapnil Sanghai
Ranch Hand

Joined: Dec 05, 2011
Posts: 41

I am unable to compile the servlet class using command prompt.
When I compile it shows the error

cannot find symbol
import javax.servlet.*;

(and all other jar files related to the servlet)

i.e. it is unable to find the jar files.
I already set the environment varibles.
What may be the reason?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60785

This means that you didn't put the proper jar file in your compilation classpath. This has been discussed countless times in the Beginning Java forum. Please search there fro your answer.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Servlet program using command prompt
Similar Threads
cannot compile
Devaka's PracticeExam3 Q.No 7
Compiling a servlet
Unmarshalling Error while registering an object in RMIRegistery
Problem in making Beer Expert app from Head First Servlet Book