WebClientUI和Tomcat的启动器
WebClient UI
我们在WebClient UI的开发工具里点了Test按钮,
成都创新互联公司主要从事网站制作、成都网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务亭湖,十多年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-6cf18fb4af5f068c.png)
会在浏览器以测试模式打开选中的view。这背后发生了什么事?注意浏览器地址栏的bspwd_cmp_test,这是什么东西?Jerry倾向于把它当作是CRM WebClient UI component在测试模式下的启动器。
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-884d7cca41724b81.png)
当我们以测试模式打开一个CRM WebClient UI component时,这个component的页面实际上是显示在一个iframe内,该iframe在上述提到的bspwd_cmp_test里实现:
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-20db8e261206bd42.png)
点击Test按钮,在下图的iframe里会把真正被测试的WebClient UI component的页面嵌入进去。这个iframe加载时,会执行onload事件绑定的JavaScript处理函数:startBSPApplication。
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-e82df43960688d09.png)
这个函数为document动态生成HTML源代码:
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-bc0a8c50578c3ce7.png)
启动器bspwd_cmp_test的页面session_single_frame.htm中立即执行的Javascript:
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-e426541c9694734a.png)
运行时展开如下:
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-8fb0994720009d20.png)
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文件,
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-4b4d69cf83c4117d.png)
之后我们可以直接使用http://localhost:9090/jerry访问Web应用了:
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-0baedff0ab154f25.png)
要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-2486f3bd80b6ca71.png)
![WebClient UI和Tomcat的启动器](/upload/otherpic65/2085791-459dc9b052f3c62d.png)
文章题目:WebClientUI和Tomcat的启动器
标题URL:http://azwzsj.com/article/jjppic.html