posted 15 years ago
Naveen.,
I presume that you have java [JDK, that is] installed on your machine. If that is correct, then proceed as follows:
Open Eclipse, and in the "Window" menu;
Preferences > Java > Installed JREs
On the right hand side, click on the "Add" button, select "Standard VM", and in the resulting pane, browse and select the JDK installation directory. [I understand that the heading says "Installed JREs", but selecting a JDK here is always the better idea].
Once all this is done, try out a simple hello world program after creating a java project in eclipse, and see if that is working correctly.
This will ensure that you have a good working setup. Now, for developing servlets, you'll need the servlet-api.jar in your classpath as well. Hope that helps.