on 04-09-2014 9:27 AM
Hello
I am interested in finding out how the bootstrap mechanism works for sapui5 applications.
I have installed eclipse with sapui5 addons and created a simple application.
I am puzzled as to how the javascript and css files are loaded.
When I run the application in google chrome I can see that a number of files are loaded from the "resources" folder in the root directory.
But no such folder exists in my root directory.
How and where are these files being loaded from?
Thanks
Andrew
Hi,
As per my understanding, it is loaded via web.xml via below coding.
<!-- ============================================================== -->
<!-- UI5 resource servlet used to handle application resources -->
<!-- ============================================================== -->
<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>
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew,
these server-side ResourceHandler components are only for Java servers. On plain web servers the UI5 files are just a directory tree which looks exactly like the URLs requested by the browser. The OpenUI5 downloads and the "static" SAPUI5 downloads contain this directory structure (zipped).
The ResourceHandler was built to enable people to deploy UI5 libraries as JAR archives (the resource handler will look inside those JARs).
Regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys
Thanks very much for the responses.
Very helpful, especially the OpenUI5 resources.
After investigating a little further I found the above documentation that explains it well.
Thanks again.
Andrew
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chandrashekhar is correct; Eclipse is doing you this "favour" if your project is a UI5 project.
However, it makes it pretty cumbersome to develop UI5 without Eclipse. If you're interested in the UI5 files itself, download OpenUI5 (OpenUI5 - Download) or use the SAP-internal Repository (in case you're an SAP employee).
We're usually using this approach within the team because it allows us just to zip the entire project and deploy it on any server we want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.