注:转自它处
1.下载 ofbiz 9.04
2.将下载的文件解压在 E:盘下,改名:E:\ofbiz9
3.E:\ofbiz9\hot-deploy 下新建hello文件夹
4.E:\ofbiz9\hot-deploy\hello 下新建 webapp 文件夹和 ofbiz-component.xml 文件
<?xml version="1.0" encoding="UTF-8"?>
<ofbiz-component name="hello"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-component.xsd">
<resource-loader name="main" type="component"/>
<webapp name="hello"
title="My First OFBiz Application"
server="default-server"
location="webapp/hello"
mount-point="/hello"
app-bar-display="false"/>
</ofbiz-component>
5.E:\ofbiz9\hot-deploy\hello\webapp下新建 hello 文件夹
6.E:\ofbiz9\hot-deploy\hello\webapp\hello下分别新建 WEB-INF文件夹和 main.ftl文件
<h1>Hello OFbiz</h1>
<p>我的第一个测试页面正在运行...</p>
7.E:\ofbiz9\hot-deploy\hello\webapp\hello\WEB-INF下新建web.xml文件和controller.xml文件
web.xml:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Hello</display-name>
<description>The First Hello World Application</description>
<context-param>
<param-name>entityDelegatorName</param-name>
<param-value>default</param-value>
<description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
</context-param>
<context-param>
<param-name>localDispatcherName</param-name>
<param-value>hello</param-value>
<description>A unique name used to identify/recognize
the local dispatcher for the Service Engine</description>
</context-param>
<context-param>
<param-name>serviceReaderUrls</param-name>
<param-value>/WEB-INF/services.xml</param-value>
<description>Configuration File(s) For The Service Dispatcher</description>
</context-param>
<filter>
<filter-name>ContextFilter</filter-name>
<display-name>ContextFilter</display-name>
<filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
<init-param>
<param-name>disableContextSecurity</param-name>
<param-value>N</param-value>
</init-param>
<init-param>
<param-name>allowedPaths</param-name>
<param-value>/control:/select:/index.html:/index.jsp:/default.html:
/default.jsp:/images:/includes/maincss.css</param-value>
</init-param>
<init-param>
<param-name>errorCode</param-name>
<param-value>403</param-value>
</init-param>
<init-param>
<param-name>redirectPath</param-name>
<param-value>/control/main</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>
org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>
org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
<!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
<!-- <listener><listener-class>
org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
<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>
<session-config>
<session-timeout>60</session-timeout> <!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
</web-app>
controller.xml
<?xml version="1.0" encoding="UTF-8" ?>
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd">
<description>First Hello World Site Configuration File</description>
<owner>Open For Business Project (c) 2005 </owner>
<errorpage>/error/error.jsp</errorpage>
<handler name="java" type="request" class="org.ofbiz.webapp.event.JavaEventHandler"/>
<handler name="soap" type="request" class="org.ofbiz.webapp.event.SOAPEventHandler"/>
<handler name="service" type="request" class="org.ofbiz.webapp.event.ServiceEventHandler"/>
<handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/>
<handler name="simple" type="request" class="org.ofbiz.webapp.event.SimpleEventHandler"/>
<handler name="ftl" type="view" class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
<handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/>
<handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
<handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/>
<preprocessor>
<!-- Events to run on every request before security (chains exempt) -->
<!-- <event type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/> -->
<event type="java" path="org.ofbiz.securityext.login.LoginEvents" invoke="checkExternalLoginKey"/>
</preprocessor>
<postprocessor>
<!-- Events to run on every request after all other processing (chains exempt) -->
<!-- <event type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/> -->
</postprocessor>
<!-- Request Mappings -->
<request-map uri="main">
<response name="success" type="view" value="main"/>
</request-map>
<!-- end of request mappings -->
<!-- View Mappings -->
<view-map name="error" page="/error/error.jsp"/>
<view-map name="main" type="ftl" page="main.ftl"/>
<!-- end of view mappings -->
</site-conf>
8.运行 E:\ofbiz9 下startofbiz.bat
9.稍等几秒 输入http://localhost:8080/hello/,页面显示如下:
Hello OFbiz
我的第一个测试页面正在运行...
分享到:
相关推荐
Hello World of the bussiness!
Bussiness PPT模板
c# 框架 2005 在web wrvice,remoting 等幾種技術輕松切換 c# 框架 2005 在web wrvice,remoting 等幾種技術輕松切換
该安装手册详细描述了SAP B1如何安装服务器和客户端程序
bussiness_System is one system for to admin work shop information.
SAP bussiness one 培训资料 ,pdf格式
sh-bussiness-eco.py
Bussiness2Vector Jupyter Notebooks for Bussiness2Vector项目 博客文章: :
这个是IT建模在管理学科上的应用,国外老师的课件,相当不错的!
A Hands On Guide On SAS ,written By VENKAT REDDY KONASANI
BusinessSkinForm11.51 XE-10.2 tokyo,完全可用(BusinessSkinForm11.51 XE-10.2 tokyo,完全可用)
AnyChat是一套跨平台的即时通讯解决方案,是基于先进的H.264视频编码标准、AAC音频编码标准与P2P技术,整合了佰锐科技在音视频编码、多媒体通讯领域领先的开发技术和丰富的产品经验而设计的高质量、宽适应性、分布式...
BussinessSkinForm的入门教程,含图文安装方法,使用讲解等。简单讲解BSF的入门用法,因为提高BSF皮肤怎么用的人太多了。
Bussiness-Inteligence:尝试2
LOHAS_Bussiness
Ricksy_Bussiness Ricksy业务0
businessObject报表使用帮助
Tibco - Total Business Integration 简介
a bussiness plan for establishing a software company