In order for a web application to run, it must be first deployed on an application server such as Payara Server. Deployment in the context of web applications is the act of installing the application on a server. It allows requests to be handled and so on. This guide will provide you with a few different ways to get your application running.
If you’re currently on GlassFish and want to try deploying an application to Payara Server, migrating is relatively painless! Check out our migration guide:
(install-directory is where Payara Server is installed)
2) To list the deployed application, use the list-applications command as shown below
3) To access the application, navigate to http://localhost:8080/clusterjsp/ to see this page:
Undeploying an Application from the Command Line
1) In this case, use the undeploy command as similarly done for deploy:
install-directory/bin/asadmin undeploy war-name
However, for war-name, omit the .war extension and refer to it by just the name. For example:
Deploying an Application from the Administration Console
1) Access the administration console by navigating to http://localhost:4848 (make sure a domain is running beforehand).
2) Click on applications under the heading common tasks on the left side of the page.
3) Any deployed applications are listed here. Since there are none right now, click on deploy.
4) The current display should be the deploy applications or modules page. There are two options available. Select Packaged File to be Uploaded to the Server and click browse. Navigate to where your application is located. Select the file and click open. You should be returned to the same page with some settings listed below. If the steps have been done correctly, it should look like this:
5) Change any settings if needed otherwise accept the default settings and click ok to be returned to the applications page. Your application should now be listed.6) Finally, under the action tab click launch. The default URL for the application is http://localhost:8080/appname In this case http://localhost:8080/clusterjsp.
Undeploying an Application from the Administration Console
2) Click on applications under the common tasks header.
3) Select the check box next to the application you wish to undeploy.
4) To undeploy the application – click undeploy. To disable the application – click disable.
Deploying an Application Automatically
1) Make sure a domain is at least running. Copy your application to theinstall-directory/glassfish/domains/domain-name/autodeploy directory. The default domain is called domain1.Doing the same step in terminal is shown as follows:
2) Finally go to http://localhost:8080/hello to access your application.
Undeploy an Application Automatically
1) Simply delete the application file from the directory. In terminal :
And that’s all! Want a complete, step-by-step guide to getting started with the Payara Platform? We’ve got an online and printable guide for that:
No, Payara does not currently support graceful stoppage. While requests may complete, long running ones, particularly long-running or asynchronous ones are likely to return a 500 error as the server is stops them before they are finished.
Hi, I stuck into issue with Payara micro. App works different when is deployed on private IP and public IP (it is only one major difference). On private ip machine (in Oracle VM) app works fine, but on server (from internet provided) SessionScoped Bean is created many times during simple authentication and I can’t use it. It doesn’t work as it should. Do You have any idea what can be wrong?
Nice blog. I recommend using DevOps tool to automate this. Here is an example.
https://flexagon.com/2018/04/automate-deployments-to-payara-application-server/
Does Payara support graceful (Disable or Undeploy) meaning it will stop receiving new requests and wait for current process to finish processing ?
No, Payara does not currently support graceful stoppage. While requests may complete, long running ones, particularly long-running or asynchronous ones are likely to return a 500 error as the server is stops them before they are finished.
Hi, I stuck into issue with Payara micro. App works different when is deployed on private IP and public IP (it is only one major difference). On private ip machine (in Oracle VM) app works fine, but on server (from internet provided) SessionScoped Bean is created many times during simple authentication and I can’t use it. It doesn’t work as it should. Do You have any idea what can be wrong?
Hi Piotr, please post your question in the Google Forum, where it will be easier for the team to look at and discuss your issue. https://groups.google.com/forum/?nomobile=true#!tags/payara-forum/payara-server . Best of luck.