sharjeel you'll need to install tomcat (or any other servlet container or application server) to compile and run your Java EE programs. Please read a book on this topic or any online tutorial...
if java is successfully installed after that, you have to instal apache tomcat server software in your system. then set the class path yet not compiled then see the complete reference j2se servelts chapter in that author compiled the program like that : c:\javac progname.java classpath "--------here your server class path to be give------" then compile you wont get that error.
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
a bit of art, as a gift, that will fit in a stocking