Hay i am having eclipse platform version 3.3.0 i am beginner in java, just started servlets But the problem is i cant import javax.servlets.*; i cant find javax.servlets on my eclipse , do i have to install more for servlets, please help me out !
The servlet API is not part of Java SE. You need to add a JAR file to the classpath. See Compiling Servlets in the JavaRanch FAQ.
In Eclipse, you add a JAR to your project by right-clicking on the project, selecting Properties, then go to Java Build Path, Libraries. Click Add External JARs; lookup the JAR with the servlet API and add it.
Just in case you are wondering what jar file to include, Download JSWDK(Java Sever Web Development Kit) from Sun's website and you will find servlet.jar in it.
Copy servlet-api.jar or servlet.jar and paste it to the $TOMCAT/lib/ folder and then try to compile the servlet file.. [ July 10, 2008: Message edited by: Rajkumar balakrishnan ]
Never try to be a hard-worker. Be a smart-worker.
My Blog