打开UI5基本设置 [英] Open UI5 basic setup
问题描述
我正在使用Eclipse Keepler安装Open UI5插件。我能够创建一个项目作为SAPUI5应用程序开发,默认情况下我有一个index.html页面,其中包含以下行
< body class =sapUiBodyrole =application>
这里我收到警告未定义的属性名称角色此外默认情况下我的index.html我有在脚本标记下得到以下生成的代码。
< script src =resources / sap-ui-core.js
id =sap-ui-bootstrap
data-sap-ui-libs =sap.ui.commons
data-sap-ui-theme =sap_bluecrystal>
< / script>
这个sap-ui-core.js文件在哪里?
以及为什么我无法自动获取脚本标记中的sap.ui.core库和sap.ui.localResource类?
我已经关注了SAP开发人员指南,但没有帮助。请帮助我,因为我刚刚开始使用OPEN UI5,一些链接及其基本信息将会有所帮助。
以下是我的index.html
<!DOCTYPE HTML> ;
< html>
< head>
< meta http-equiv =X-UA-Compatiblecontent =IE = edge>
< meta http-equiv ='Content-Type'content ='text / html; charset = UTF-8'/>
< script src =resources / sap-ui-core.js
id =sap-ui-bootstrap
data-sap-ui -libs =sap.ui.commons,sap.ui.table,sap.ui.ux3
data-sap-ui-theme =sap_bluecrystal>
< / script>
< script>
var myView = new sap.ui.jsview(sampleopenui5 / Main);
myView.placeAt(content);
< / script>
< / head>
< body class =sapUiBodyrole =application>
< div id =content>< / div>
< / body>
以下是错误消息i我收到了
无法加载资源:服务器响应状态为404
如果为任何Web服务器设置UI5库,则需要刚刚从 openui5 sdk发行版中复制了资源文件夹并将其放入您的项目中。
i am using Eclipse Keepler where i have install Open UI5 plugins. I am able to create a project as SAPUI5 Application Development , i have a index.html page in it by default which has a following line
<body class="sapUiBody" role="application">
here i am getting warning "Undefined attribute name Role" moreover by default in my index.html i have got below generated code under Script Tag.
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
where is this sap-ui-core.js file present ? and why i am not able to automatically get sap.ui.core library and sap.ui.localResource class in the Script tag ? I have followed SAP Developers guide but its not helpful. Please help me out as I have just started with OPEN UI5 some link with basic information on it will be helpful.
below is my index.html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.ui.ux3"
data-sap-ui-theme="sap_bluecrystal">
</script>
<script>
var myView = new sap.ui.jsview("sampleopenui5/Main");
myView.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
below is the error message i am getting
Failed to load resource: the server responded with a status of 404 http://localhost:8758/sapui5/resources/sap-ui-core.js Failed to load resource: the server responded with a status of 404 (Not Found)
When running on Tomcat, the resources "folder" is actually set up as a servlet unpacked from a jar file. If you look in the WEB-INF/web.xml file you'll see this:
<!-- ============================================================== -->
<!-- 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>
Your Tomcat server should show the jar deployed in your Servers tab:
If you set up the UI5 library for any web server, you'd just have copied the resources folder out of the openui5 sdk distribution and put it in your project.
这篇关于打开UI5基本设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!