Eclipse integrated glassfish to compile JSP

Source: Internet
Author: User
Tags glassfish

The school opened a J2EE elective course. The starting point of the teacher's lecture was a bit high. For students we didn't know about Web, JSP was a bit confusing at the beginning. After thinking about Tomcat for one afternoon, it still cannot be started normally. No way. I tried glassfish.

First, I went down the latest Java EE SDK on the Oracle website, which included glassfish. Some basic configurations were made during installation. After startserv is started, open 127.0.0.1: 8080. The following is displayed, proving that the service has been started. However, manual start is a little troublesome. It is much easier to integrate eclipse into glassfish, so I found some methods.

Eclipse I use is Eclipse IDE for Java EE developers ,:Http://www.eclipse.org/downloads/

Open eclipse --- windows --- preferences --- server ---- runtime environments, and click Add. The following interface is displayed.

Click Download additional server adapter in the upper-right corner (Be sure to connect to the internet). In this case, you will obtain a list of some plug-ins. If you select Oracle glassfish server tools, you will be prompted to download them in the background, let's do something else. There will be a prompt after the download, so that you can restart eclipse.

After restart, it is still enabledEclipse --- windows --- preferences --- server ---- runtime environments. The glassfish option is available.

Select glassfish server open source Edition 3 (Java EE 6) to complete the basic integration. Open eclipse, file ---- New ---- dynamic web project, and you can compile JSP. When you use eclipse to run JSP, eclipse automatically starts glassfish and closes it after use, which is much easier. Glassfish also provides a consoleHttp: // localhost: 4848/Provides some basic management and database links. I have not learned more about it.I tried to make a simple web address book. The database uses access.Write J for the first timeSP,CodeIt's not misleading. Let's look at the effect.

 

The homepage submits information about Michael Jacob.

Check the database after the submission is complete. You already have information about Michael Jacob.

Search for the ID of John and modify the information of John as Lee.

Check the database again. The data has been updated.

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.