JSP Learning Notes (ii)-----Running JSP files using Tomcat

Source: Internet
Author: User
Tags copy tomcat
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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.