You can add an associated application server in netbeans so that we can release the application in netbeans.ProgramAfter,
You can deploy an application to an application server with one click.
In addition, after modifying the application, it can also be reflected to the corresponding application server in real time, facilitating web application debugging.
1. Install and open netbeans. I am using netbeans6.9.1.
Go to service> Server> right-click Add Server
2. Select glassfish v2.x (I am using glassfish v2.1.1)
For installation of glassfish, see: http://blog.csdn.net/ooflywing/archive/2011/04/09/6312681.aspx
3. Set the location of the installed glassfish Server
4. Set the username/password for glassfish. The default password is adminadmin.
5. After adding the server, you can see the newly added glassfish server under the server in step 1.
Here, you can start and stop glassfish.
6. Let's try one-click deployment at the beginning.
First, create a web application project. You can set the server during creation, as shown in:
7. After the web application is created, right-click the project name and choose deploy.
8. Now we switch to the service screen and you can see that the Web application has been deployed on the glassfish application server.