For
JDBC Program
1.Save mysql
connector file in C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext
2.Save Program
in jdk/bin
3.create
database and table in phpmyadmin(xampp server)
For jsp -C:\Program
Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT
save program in
Root folder
Run program in
http://localhost:8080 /
For
servlet
save
servlet-api jar file in C:\Program
Files\Java\jdk1.7.0_80\jre\lib\ext
save java file
in C:\Program Files\Apache Software Foundation\Tomcat
8.5\webapps\ROOT\WEB-INF\classes
web.xml file
<servlet>
<servlet-name>FirstServlet</servlet-name>
<servlet-class>FirstServlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FirstServlet</servlet-name>
<url-pattern>/MyServlet</url-pattern>
</servlet-mapping>
PATH SET-Go to My Computer properties ->
Click on advanced tab then environment variables -> Click on the new tab of
user variable -> Write JAVA_HOME in variable name and paste the path of jdk
folder in variable value -> ok -> ok -> ok.
After setting the JAVA_HOME double
click on the startup.bat file in apache tomcat/bin.
COmpile program cmd
C:\Program
Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT\WEB-INF\clas
ses>javac
info_check.java
open apache
tomcat and Excute pProgram-http://localhost:8080/info_check1