Tomcat environment settings and the first JSP program implementation

Source: Internet
Author: User

Tomcat environment configuration and first JSP program implementation configuration Tomcat bad configuration

1.java_home: The installation directory for the JAVA JDK only (the previous level of the bin directory) F:\JDK7
2.catalina_home: The installation directory with a value of Tomcat G:\Tomcat\apache-tomcat-7.0.79

The first JSP program is ready to work

1. Download the installation MyEclipse and transfer the original eclipse configuration to MyEclipse
Eclipse:file-->export-->general-->preferences-->export all--> fill out which folder to export to
Myeclipse:file-->import-->general-->preferences-->import all--> to enter the saved file
2. Create a Web project, where Src is the folder where the source code is placed, Webboot is the page of the page, and the two folders under that directory cannot change its name
3. Open JSP file, the default visual interface for the upper and lower interface, accustomed to the pure Code interface can be set up: Right-click Index.jsp->open witn-> Select MyEclipse JSP Editor; Unified Settings:window-> Preferences->general->ediors->file associations-> above Select *.jsp-> Select MyEclipse jsp editor-> Select the Default->ok on the right
4. Set the Encoding method:window-> search Jsp->jsp->encoding-> Select Utf-8

Access to JSP programs via browser (methods vary)

1. After opening the Tomcat installation directory->conf->server.xml-> open, enter (line 4th) XML statement at the end: <context path= "/text" docbase= "F:\My Eclipes\workspace\text\webroot "(Path to JSP file) reloadable=" true "/><context path="/text docbase=jsp file path, To its Webroot directory reloadable= "Ture"/>
2. Start Tomcat
3. Open the browser, address input: Http://localhost:8080/text (the value of the path of the Lost XML statement)/index.jsp

Tomcat environment settings and the first JSP program implementation

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.