1. What is NetBeans?
NetBeans IDE: enables developers to quickly create Web, enterprise, desktop, and mobile applications with the Java platform;
supported languages : PHP, Ruby, JavaScript, Groovy, Grails, and C + +;
NetBeans: including open source development environment and application platform, is Sun Company (Oracle acquisition in 2009) opened in 2000 for developers and customer community home, designed to build a world-class Java IDE;
2. Simple use of NetBeans
In order to build a simple server locally, you implement a simple interface to write and Invoke! (The author is client development)
2.1. Installation
NetBeans is a fool-only installation, where resources are available in version 8.0.2; install the JDKbefore installing!
2.2. New Project
Click the directory "file"---"New project"---select "Java web" Web application---"Point next to the project naming---" Completed
The results show:
2.3. New Servlet
Right-click "New File"---Now Web category, file type select "Servlet"---"Next file name---" Completed
The results show:
Left: new servlet file; Above: file path following URL: URL address
For example: The requested URL is http://localhost:8080/webapplicationtest/newservlettest?&name=%@&psw=%@ "
2.4. Running the project
2.4.1, Web page will display index.html file
<!DOCTYPE HTML><!--to the license header, choose License Headers in Project properties.to change this template file, choose Tools | Templatesand Open the template in the editor. -<HTML> <Head> <title>This is Foreverguard Blog Park</title> <MetaCharSet= "UTF-8"> <Metaname= "Viewport"content= "Width=device-width, initial-scale=1.0"> </Head> <Body> <ahref= "https://www.cnblogs.com/xianfeng-zhang/">Foreverguard Blog Park</a> </Body></HTML>
index.html
Effect display: A hyperlink jumps to Foreverguard Blog Homepage
2.4.1, client can request by URL address
URL: http://localhost:8080/webapplicationtest/newservlettest?&name=%@&psw=%@ "
Introduction to NetBeans and simple use