Skip to Content

Assumptions: You know how to setup a Java WAR project.

The HTML5 Developer Center main page is not up to date and still points to 1.8.4.  Also, for some reason or another you may not use eclipse.  HANA Studio was crashing on me frequently so I switched back to Intellij.

The Eclipse update site is located at: https://tools.hana.ondemand.com/juno

We’ll need to take the jars from there.

Using wget we can fetch the jars we need.

wget https://tools.hana.ondemand.com/juno/plugins/com.sap.ui5.{ux3,visualization,viz,core,commons,themelib_sap_ux,themelib_sap_goldreflection,utils,richtexteditor,table,mobile,resource.osgi,resource,makit,branding}_1.10.3.jar

Setup your standard java war project and put the jars into your WEB-INF/lib folder.

Within your web.xml:

  <servlet>
    <display-name>ResourceServlet</display-name>
    <servlet-name>ResourceServlet</servlet-name>
    <servlet-class>com.sap.ui5.resource.ResourceServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ResourceServlet</servlet-name>
    <url-pattern>/resources/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ResourceServlet</servlet-name>
    <url-pattern>/test-resources/*</url-pattern>
  </servlet-mapping>

From 1.8.4 to 1.10.3, a dependency was added to OSGI.

If you’re using maven:

 <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi_R4_core</artifactId>
        <version>1.0</version>
 </dependency>

Or download http://repo1.maven.org/maven2/org/osgi/osgi_R4_core/1.0/osgi_R4_core-1.0.jar to your lib.

Your app should come up like so.

Screen Shot 2013-04-16 at 5.14.26 PM.png

And the resources should be listed.

Screen Shot 2013-04-16 at 5.14.39 PM.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply