How to run SAPUI5 applications on Jetty Server

0
3642

[adsenseyu2]

Hello everyone, in this SAPUI5 tutorial we will learn how to run SAPUI5 application on Jetty Server while testing you application in Eclipse IDE. As we know that we can run SAPUI5 application as Web App Preview to test the application in eclipse. Lets us the disadvantage of running as Web App Preview

Disadvantage of running on Web App Preview

  • Creates a random port which breaks the link(url) when copied into a browser for every execution

To address the above issue we can use Jetty Server to run our SAPUI5 application at some constant port number. So lets us see how we can install jetty server in eclipse and test SAPUI5 application in jetty server. Lets get started

1. Launch your Eclipse IDE. Navigate to Help → Install New Software.

Install New Software

2. Copy this link http://eclipse-jetty.github.io/update/ in Work with field in Available Software window and hit Enter, you should be able to see jetty plugin listed down like below. Select the check box and hit Next.

Available Software

[adsenseyu2]

3. In Install Details window, click Next

Install Details4. In the Review Licenses window, read the license agreement and choose I accept the terms of the license agreements. Click on Finish to start the installation.

Review Licenses5. While installation, you will be prompted with a Security Warning dialog box like below. Click on OK to continue the installation.

Security Warning6. At the end of installation, you will be prompted with below confirmation window to restart the Eclipse. Click on Yes to confirm and eclipse will be restarted with the Jetty Server installed.

Software Update7. Now create a sample SAPUI5 application and right click on SAPUI5 application and choose             Run AsRun Configurations

Run Configurations for SAPUI58. In Run Configurations window identify Jetty Webapp in the left pane and right click and choose New. You should see the window like below. Enter the Project name, Webapp Folder and Context Path fields like below and click on Run.

Jetty Webapp Configuration for SAPUI59. Now Jetty Webapp server will run and you can see the same in the server console like below. You can see the server is running at port 8080. This port will never change until you stop the server

Server Console10. Now open your browser and copy the url. You should see the output of SAPUI5 applications

Jetty Webapp Server URL  for SAPUI5SAPUI5 Application OutputCongrats you have successfully configured Jetty Webapp in Eclipse and ran your SAPUI5 application.

Please stay tuned to us for more SAPUI5 tutorials.Please feel free to comment and let us know your feedback. You feedback will keep us alive.

like-128