JSP learning notes (2) ----- run the JSP file using Tomcat

xiaoxiao2021-03-06  81

Some netizens don't know how to run their JSP files, I will introduce it to you, give you a point: 1. Download and install Tomcat. Download address: http://jakarta.apache.org/tomcat2. Write your own JSP page and Java objects. 3. Configure your own web application. Configuration method: Add a line in Tomcat_Home / conf / server.xml file: where tomcat_home is the main Tomcat Directory, appname is the name of your web application. 4. Copy your JSP file, HTML file, and image files to tomcat_home / webapps / appname directory. 5. Compile your Java file. 6. Copy the compiled Class file to the Tomcat_Home / WebApps / Web-INF / CLASSES directory. You can also pack the class file into a JAR file to put it in the Tomcat_Home / WebApps / Web-INF / LIB directory. 7. ALL IS OK! You can see your results on your browser: http: // localhost: 8080 / appname / youjsp.jsp, Appname is your web application name, youjsp.jsp is you Written JSP file name.

转载请注明原文地址:https://www.9cbs.com/read-122314.html

New Post(0)