js| notes
Some netizens do not know how to run their own JSP files, I briefly introduce here, to provide you with a point of reference:
1. Download and install Tomcat. Download Address: Http://jakarta.apache.org/tomcat
2. Write your own JSP Web pages and Java objects.
3. Configure your own Web application. Configuration method:
To add a line to the Tomcat_home/conf/server.xml file:
<content path= "/appname" docbase= "webapps/appname" debug= "0" reloadable= "true"/>
Where Tomcat_home is the home directory of TOMCAT, AppName is the name of your Web application.
4. Copy your jsp files, HTML files, image files to the Tomcat_home/webapps/appname directory.
5. Compile your Java files.
6. Copy the compiled class file to the Tomcat_home/webapps/web-inf/classes directory. You can also package the class file into a jar file and place it in the Tomcat_home/webapps/web-inf/lib directory.
7. All is ok! You can see your results in your browser:
http://localhost:8080/appName/youjsp.jsp
Among them, appname is your Web application name, youjsp.jsp is the JSP file name you write.