`
jiasudu1649
  • 浏览: 715160 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

ofbiz中的几个重要文件总结

阅读更多
component-load.xml
路径:ofbiz\application\
作用:定义了所有在OFBIZ启动时需要加载的应用程序的位置。所以,当你创建了新的应用程序时,别忘了在该文件中添加应用程序的位置信息。在ofbiz\hot-deploy\目录下的应用程序不需要在component-load.xml里定义,ofbiz启动时会自动加载所有hot-deploy下的内容。
经典内容:
  <load-component component-location="${ofbiz.home}/applications/content" />
ofbiz-component.xml
位置:基于ofbiz的任何应用程序根目录下,如ofbiz\applications\accounting\
按作用:指出该应用程序数据模型(<entity-resource>),商业逻辑(<service-resource>),web
  应用程序(<webapp.../>)的位置.
  经典内容:
  <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml" />
  <service-resource type="model" loader="main" location="servicedef/services_agreement.xml" />
  <webapp name="accounting" title="Accounting" server="default-server" location="webapp/accounting" base-permission="OFBTOOLS,ACCOUNTING" mount-point="/accounting" />
 
  web.xml
  位置:(以accounting为例)accounting\webapp\accounting\WEB-INF
  作用:配置main servlet(s),控制后台服务器(如tomcat server),及一些相关参数。
  经典内容:
  <servlet>
  <servlet-name>ControlServlet</servlet-name>
  <display-name>ControlServlet</display-name>
  <description>Main Control Servlet</description>
  <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
  </servlet>
<servlet-mapping>
  <servlet-name>ControlServlet</servlet-name>
  <url-pattern>/control/*</url-pattern>
  </servlet-mapping>
 
  controller.xml
  位置:(以accounting为例)accounting\webapp\accounting\WEB-INF
  作用:负责控制接收到的请求request。任何到来的请求,无论是屏幕请求,还是服务请求或事件请
  求,都要经过controller.xml的处理,然后转交给相应的相应的部分处理。
  经典内容:
  <request-map uri="main">
  <security https="true" auth="true" />
  <response name="success" type="view" value="main" />
  </request-map>
  <view-map name="main" type="screen" page="component://accounting/widget/CommonScreens.xml#main" />
  (当请求"main"到来时,在controller.xml中,先找到<request-map uri="main">,根据其value="main",继续向下找到view-map name="main",最后得到该请求该返回的页面位置page="component://accounting/widget/CommonScreens.xml#main"



http://blog.sina.com.cn/s/blog_4a4820f9_0008hi.html
分享到:
评论
2 楼 jspzhao 2007-09-21  
d
1 楼 jspzhao 2007-09-21  
<font color="red"><a href="www.google.com">顶了,先</a></font>

相关推荐

Global site tag (gtag.js) - Google Analytics