WebClient UI
我们在WebClient UI的开发工具里点了Test按钮,
成都创新互联公司主要从事网站制作、成都网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务亭湖,十多年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220

会在浏览器以测试模式打开选中的view。这背后发生了什么事?注意浏览器地址栏的bspwd_cmp_test,这是什么东西?Jerry倾向于把它当作是CRM WebClient UI component在测试模式下的启动器。

当我们以测试模式打开一个CRM WebClient UI component时,这个component的页面实际上是显示在一个iframe内,该iframe在上述提到的bspwd_cmp_test里实现:

点击Test按钮,在下图的iframe里会把真正被测试的WebClient UI component的页面嵌入进去。这个iframe加载时,会执行onload事件绑定的JavaScript处理函数:startBSPApplication。

这个函数为document动态生成HTML源代码:

启动器bspwd_cmp_test的页面session_single_frame.htm中立即执行的Javascript:

运行时展开如下:

Tomcat
最初我们部署Web应用到tomcat上的做法,一般是首先用Maven将Web项目打包成war文件,再手动或者写脚本将war文件拷贝到tomcat对应目录下。
现在我们可以在项目pom.xml文件里使用下面这个插件:
org.apache.tomcat.maven tomcat7-maven-plugin 2.2 /jerry 9090 UTF-8
然后在命令行里执行命令:mvn tomcat7:run
这个tomcat7-maven-plugin插件可以作为启动器,帮我们启动Tomcat并且加载war文件,

之后我们可以直接使用http://localhost:9090/jerry访问Web应用了:

要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:


当前文章:WebClientUI和Tomcat的启动器
转载注明:http://scpingwu.com/article/jjppic.html