i am using apache tomcat server.
i wrote simple "FirstServlet.java" and stored in my directory : "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\servlet\WEB-INF\classes>"
i also created web.xml file and saved it outside classes folder, which includes following code:
in cmd prompt.. i setted c:\set classpath="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
after that, i started tomcat and my project "servlet" in which my "FirstServlet.java" got successfull deployed... "true"
but i am not able to compile it ... "javac FirstServlet.java"
i am getting error 'javac' is not recognized as internal or external command,operable program or batch file.....
Whenever you install the JDK on your machine, it's a very good advice to setup environment variable JAVA_HOME to point to the directory where you've installed the JDK. For instance, C:\jdk1.7.0_03. The steps for doing so are similar to those described in http://www.coderanch.com/how-to/java/HowToSetTheClasspath.
After that you should add the JDK's bin folder to your PATH variable. I say "add to" - don't replace your current value or your system may stop working properly. Anyway, just add ;%JAVA_HOME%\bin at the end of the current value. The %JAVA_HOME% part will be replaced by the actual value, even if you change that.
Another remark: your servlet class value is invalid. It needs to be the class name, and can therefore never start with a /. You should also put your servlets inside packages, and then include the package name in the servlet class value.