Install Tomcat Server and set the following Environment variables 1)CATALINA_HOME = C:\apache-tomcat-6.0.18;
Create application folder inside C:\apache-tomcat-6.0.18\webapps and put your jsp file there.Then start the tomcat from startup.bat in C:\apache-tomcat-6.0.18\bin.
After that open the browser and type the following url:http://localhost:8080/yourapplicationFolder/yourJspFile.jsp
Take example from http://www.roseindia.net/jsp/
and run the jsp code.