Every time I create a class file in servlet I have to set the classpath from the tomcat folder to servlet-api jar file is there any alternative so that I don't have to set classpath each time I create a class java file in application
Please note: Typing in all caps is the equivalent to yelling in a web forum and is considered rude.
As to your question: There are several different ways to set up and manage your environment for compiling Java classes. Classpath issues are usually discussed in the Java In General (Beginner) forum so I'll move this thread over there for you. Also this link from our Servlets FAQ might be of interest to you. http://faq.javaranch.com/view?CompilingServlets It contains a link to our classpath FAQ.