cancel
Showing results for 
Search instead for 
Did you mean: 

why is my sap ui5 application not running in preview ?

Former Member
0 Kudos

Hi all,

i'm new to creating SAPUI5 application. my html code is running fine on the browser,

but when i try to "run as preview" the same app in 'eclipse IDE'  it doesn't display anything!!

is any local server like apache tomcat need to be installed

neither it shows any errors...Plz help.!!

This is the code in index file.

sap.ui.jsview("sapui5.demo_app", {

  /** Specifies the Controller belonging to this View.

  * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.

  * @memberOf sapui5.demo_app

  */

  getControllerName : function() {

  return "sapui5.demo_app";

  },

  /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.

  * Since the Controller is given to this method, its event handlers can be attached right away.

  * @memberOf sapui5.demo_app

  */

  createContent : function(oController) {

  var myButton = new sap.ui.commonsutton("btn");

  myButton.setText("Hello World!");

  myButton.attachPress(function(){$("#btn").fadeOut();});

  myButton.placeAt("uiArea");

  }

});

Thanks,

Antony.

Accepted Solutions (1)

Accepted Solutions (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Do you have Jetty server embedded in eclipse IDE? When you try to test sapui5 locally on eclipse, it will run on embedded jetty server. refer       Documentation/Tools/TestingInEclipse – SAPUI5 Wiki (TIP CORE User Interface)

you can setup jetty plugin. Refer Jetty and Eclipse Integration in 3 Steps | Javalobby and

Setting up Jetty in Eclipse - Stack Overflow

Regards,

Chandra

Former Member
0 Kudos

Thank you Chandra but i encountered a weird problem! is this a bug or incomplete IDE.

ChandraMahajan
Active Contributor
0 Kudos

Hi,

It seems your IDE still missing some required dependency plugin.

Regards,

Chandra

Answers (1)

Answers (1)

former_member254395
Active Participant
0 Kudos

Hi

No. not requited any servers You can run your application by simply right click the index.html--> run as web application preview.  This will work  for 100%. But you can check,if any error's are there by clciking f12 from google crome browser . Look into the console of the crome after clciking f12.  I hope all ui5 related tools are installed in your eclipse .

Thanks & Regards

Rabin D