cancel
Showing results for 
Search instead for 
Did you mean: 

why servlet "ResourceServlet" is unable to load sap.ui.core libraries?

0 Kudos

when i am using this CDN it's working fine

<script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-libs="sap.m" data-sap-ui-theme="sap_bluecrystal"> </script>

but when i am using local resource mapping through servlet its not working.showing "resource not found error"

<script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-libs="sap.m" data-sap-ui-theme="sap_bluecrystal"> </script>

i know the mechanism how the servlet "ResourceServlet" is working in web.xml

can anyone please explain why the servlet is not able to load libraries and any fix for this!!!

thanks in advance!!!!!!!!

Accepted Solutions (0)

Answers (3)

Answers (3)

junwu
Active Contributor

src="../resources/sap-ui-core.js" if your app is in sub folder

0 Kudos

.

this is my folder structure so i am giving the path as src=" resources/sap-ui-core.js"

junwu
Active Contributor
0 Kudos

how you run your app? what's the result? screenshot

0 Kudos

i run it in webapp preview.

both "resources/sap-ui-core.js" and "./resources/sap-ui-core.js" working now.

but it failed to load the the ui components its not loading i think

when src ="resources/sap-ui-core.js" or "./resources/sap-ui-core.js"

output

when src = "https://openui5.hana.ondemand.com/1.48.2/resources/sap-ui-core.js"

output

0 Kudos

when src = " ./resources/sap-ui-core.js"

when src = "https://openui5.hana.ondemand.com/1.48.2/resources/sap-ui-core.js"

junwu
Active Contributor
0 Kudos

what is your folder structure?