| 1. |
How To Deploy And Undeploy Application Automatically In Glassfish? |
|
Answer» To Deploy the Sample Application Automatically You can deploy applications automatically by placing them in the as-install/domains/domain-name/autodeploydirectory, wheredomain-nameis the name of the domain for which you want to configure automatic deployment. For this example, USE the default domain, domain1: as-install/domains/domain1/autodeploy The sample application must be available before you start this task. Copy the applicationWAR file to theas-install/domains/domain-name/autodeploydirectory. On UNIX, Linux, and MAC OS X systems, type this command: cp sample-dir/hello.war as-install/domains/domain-name/autodeploy OnWindows systems, type this command: copy sample-dirhello.war as-installdomainsdomain-nameautodeploy GlassFish SERVER automatically DISCOVERS and deploys the application. The default URL for the application is as follows: http://localhost:8080/hello/ To Undeploy the Sample Application Automatically Change to the domain'sautodeploydirectory. cd as-install/domains/domain-name/autodeploy Delete the sample application'sWAR file to undeploy and remove the application. On UNIX, Linux, and Mac OS X systems, type this command: rm hello.war OnWindows systems, type this command: del hello.war To Deploy the Sample Application Automatically You can deploy applications automatically by placing them in the as-install/domains/domain-name/autodeploydirectory, wheredomain-nameis the name of the domain for which you want to configure automatic deployment. For this example, use the default domain, domain1: as-install/domains/domain1/autodeploy The sample application must be available before you start this task. Copy the applicationWAR file to theas-install/domains/domain-name/autodeploydirectory. On UNIX, Linux, and Mac OS X systems, type this command: cp sample-dir/hello.war as-install/domains/domain-name/autodeploy OnWindows systems, type this command: copy sample-dirhello.war as-installdomainsdomain-nameautodeploy GlassFish Server automatically discovers and deploys the application. The default URL for the application is as follows: http://localhost:8080/hello/ To Undeploy the Sample Application Automatically Change to the domain'sautodeploydirectory. cd as-install/domains/domain-name/autodeploy Delete the sample application'sWAR file to undeploy and remove the application. On UNIX, Linux, and Mac OS X systems, type this command: rm hello.war OnWindows systems, type this command: del hello.war |
|