cancel
Showing results for 
Search instead for 
Did you mean: 

HTML5 development in Eclipse

former_member190457
Contributor
0 Kudos

Hi all,

I'm developing HCP HTML5 applications based on UI5.

While the RDE looks really great, I'd still like to use the good old Eclipse to launch my project locally.

To do so, I've created an HTML5 application from the cockpit, generated a sample UI5 project from RDE and pushed all sources to Git repo.

I tested the applications and it works perfectly when executed from RDE.

In addition, I've cloned the Git repo in Eclipse and now I'd like to run my application from there, as you might do when creating an Eclipse UI5 project.

However I'm not sure how to do that. I've added the SAPUI5 facet to the local Eclipse project and tried to launch

<project> -> run as -> Web App Preview

However a browser error page shows up with an odd url and HTTP400 message.

I'd be grateful if anyone could explain how/whether this could be achieved.

Thanks, regards

Vincenzo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vincenzo,

My suggestion is as follows:

1.The http400 error may happen when your local Eclipse project hasn't  been configured well,the Web App Preview uses a inner server which Eclipse provide(jetty);

2.You may create a tomcat server with Eclipse to check the Web project.


Regards,

Seaman

former_member190457
Contributor
0 Kudos

Hi Seaman, thanks for your help.

I tested the application with a plain Apache server but I now realize it simply cannot work.

The UI5 resources are located through the destination service, which isn't there in Apache HTTP server for instance.

I'm not sure if it might work on the local HCP server, where destinations can be configured.

Any experience on that?

Thanks regards

Vincenzo

Former Member
0 Kudos

Hi Vincenzo,

I have no experience of HCP server,as far as I know,there are two ways to develop UI5 application:Local Eclipse or Online RDE.If you are developing apps in Eclipse, you must assure that the UI5 develop add-on(UI Development Toolkit for HTML5 ) is installed correctly so that you can take use of the local UI5 core  library resource,the following link may help you:Download Evaluation Package for UI Development Toolkit for HTML5 ;If you are using RDE, please refer to http://scn.sap.com/docs/DOC-55466 .

Regards,

Seaman

Vlado
Advisor
Advisor
0 Kudos

Hi Vincenzo,

Yes, SAPUI5 apps can be tested on a local server as well as with the Web App Preview option. See SAP HANA Cloud Platform Documentation. However, after thinking a bit more about it, I'm afraid this won't work in the case of HCP HTML5 apps as all the necessary infrastructure would not be available in the local scenario (e.g. dispatcher service - see SAP HANA Cloud Platform Documentation).

Cheers,

--Vlado

PS: I was probably wrong to move the thread here, and now I can't move it back to HCP (I don't have moderator rights in UI5 space).

former_member190457
Contributor
0 Kudos

No problem, thanks for your help Vlado.

I see that the dispatcher and destinations won't be there in Eclipse Web Preview, so I guess that Eclipse at the moment can only be used as editor.

Actually, I think the RDE can provide even faster code-deploy-run cycles, so maybe no need for Eclipse at all.

Answers (1)

Answers (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Vincenzo,

I think you should be more successful in getting it answered in the SAPUI5 dev center - moving it there.

HTH!

--Vlado

former_member190457
Contributor
0 Kudos

Sure, thanks a lot.

I posted it on the HCP section as I thought the solution might be something RDE-specific.

Regards

Vincenzo