
Leading the Way: Payara Platform Community 7 Beta Now Fully Jakarta EE 11 Certified
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
This is Part 2 of our Payara Server – Back to Basics series, see Part 1 – Installing Payara Server on Ubuntu here.
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:
{{cta(‘39319061-9b0e-4e3b-ae3c-03f0b547d094’)}}
1) For simplicity, this demonstration will be using a sample application called clusterjsp.war, the source code of which can be downloaded from:https://github.com/eclipse-ee4j/glassfish-samples/tree/master/ws/javaee6/ha/clusterjsp.
2) Place your application or the hello application into a directory of your choosing. Lets refer to this directory as sample-dir .
3) Before you begin to deploy any application, at least one Payara Server / GlassFish domain must be started. For guidance on how to do this refer to my previous GlassFish Back to Basics blog at https://www.payara.fish/blog/back-to-basics-installing-payara-server-5-on-ubuntu .
1) Use the asadmin deploy command in your shell box. The form of the command is as follows:
install-directory/bin/asadmin deploy sample-dir/war-name
(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:
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:
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.
1) Go to http://localhost:4848 .
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.
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.
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:
{{cta(‘7a5cce4a-1c08-4a04-a259-3c85c1934c9d’)}}
Share:
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
Enterprise Java applications power global commerce, healthcare, government and countless other industries. These systems must be scalable, secure and […]
May 2025 marks a monumental milestone in software development: Java turns 30. The impact of this language on the […]
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.