turbine layout control(二)helloworld example

本文详细介绍了如何使用Turbine框架搭建动态布局与动作的实例,包括设置环境、构建应用、部署到Web容器、解决依赖问题及运行容器,最终通过本地服务器访问应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

turbine layout control(二)helloworld example

official website
http://turbine.apache.org/index.html

demo tutorial
http://henning.schmiedehausen.org/turbine/

read book <turbine trutorial.pdf>

Hello World

copy a tomcat to the turbine directory and create a file build.properties:
maven.appserver.home=E:/turbine/apache-tomcat-6.0.20

Setup Build Environment
>maven -Dturbine.app.name=helloworld turbine:setup

success and create a directory named helloworld.

Compile Application
>maven java:compile

Deploy it to the web container
>maven turbine:deploy

find a good way to fix the 301 error when download the jars from maven1, add some configuration to build.properties:
maven.repo.remote=http://repository.atlassian.com,http://mirrors.ibiblio.org/pub/mirrors/maven,http://www.ibiblio.org/maven

build error message:
BUILD FAILED
File...... C:\Users\dell\.maven\cache\maven-jar-plugin-1.6.1\plugin.jelly
Element... ant:fail
Line...... 53
Column.... 19
You must define currentVersion in your POM.

change the build.properties file place to
Maven2 is ${user.home}/.m2/settings.xml
Maven1 is ${user.home}/build.properties

and go to the directory
E:\turbine\helloworld>maven java:compile
E:\turbine\helloworld>maven turbine:deploy

Run The Container
visit the local server http://localhost:8080/helloworld/

What has happened during my working
turbine:setup generates a new application
java:compile builds the .class files
turbine:deploy intalls the web application
turbine:war Bind war for deployment
site documentation

Setup for Eclipse
>maven turbine:install-libs Fetch all necessary libraries

Generate Eclipse Configuration
>maven eclipse

The Turbine View is composed from
Page Everything you see
Screen Content of the page
Navigation Top,Bottom,Menu
Layout Where to put everything

Velocity and Turbine
Turbine provides classes for Velocity integration:
Pages: VelocityPage
Screens: VelocityScreen,VelocitySecureScreen
Layouts: VelocityOnlyLayout,VelocityDirectLayout
Navigation: VelocityNavigation

Existing Services

Services used by the HelloWorld application:
AssemblerBroker----->Module Management
RunData Service----->Run Data Management
Template Service---->Template Lookup
Velocity Service ----->Velocity Rendering
Pull Service ----------->Tools
Factory & Pool Service--->Object Management

late init: Initialization at first lookup
early init: Initialization at Turbine startup

default is late init

Yes, after all the work, I know that turbine is really a big framework, it consistent of ormapping, validator, security and etc.
But all I need is dynamic layout and actions. I think I will do some extra work to separet what I need.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值