首页 > SAP > SAPUI5 > How to run SAPUI5 applications on Jetty Server
2019
08-27

How to run SAPUI5 applications on Jetty Server

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.

2. Copy this link

3. In Install Details window, click Next

4. 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.

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

6. 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.

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

8. 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.

9. 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

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

Congrats you have successfully configured Jetty Webapp in Eclipse and ran your SAPUI5 application.

Please stay tuned to us for more

最后编辑:
作者:yangsen
有需要可在文章留言或者邮件yan252@163.com给我。