My java program was running successfully but
im getting javax.servlet package not found error while running servlet program....
I dont know what,s the problem... someone help me to get rid of this problem
What s the mistake i did
The javax.servlet servlet classes reside in 2 places: the servlet-api.jar and in the Tomcat server internal jars.
When compiling a J2EE webapp, you have to have the servlet-api.jar in the compile classpath, however, you do not include copies of it or any other library in the TOMCAT_HOME/lib directory in the WAR that you produce. Tomcat will supply them at run time.
Beyond that, as long as what you have produced is a valid WAR (as defined by the J2EE spec) and properly deployed it into Tomcat, then launched Tomcat using the standard startup scripts that come with Tomcat, everything should resolve properly.
An IDE is no substitute for an Intelligent Developer.
Joined: Oct 23, 2012
I didnt get the output yet.... What i have to deploy into tomcat....
I have a doubt actually..... am i using the correct version of java and tomcat?
Your JVM and Tomcat releases should be compatible. You do not have to set explicit classpaths, but you do need to set the JAVA_HOME environment variable to point to the JDK directory before launching Tomcat.
To deploy a webapp into Tomcat, you must create it in WAR format, as documented by the J2EE specification. A WAR file can then be deployed by copying it into the TOMCAT_HOME/webapps directory.