J2EE tutorial 实例安装
本节介绍各个代表性实例的安装,原英文介绍文档位于以下路径:J2EE1.4/samples/docs/list.htmlDuke’s Bookstore
1 编译。
切换到J2EE1.4 ampleswebappsookstoreookstore1 rc
1) 执行 asant clean.,这是清除
2) 执行 asant core,这是编译
2 启动PointBase数据库,并准备数据
1) 执行<pointbase_install_dir>/tools/serveroption/startserver.bat 脚本
2) 启动Server
3) 切换到J2EE1.4 ampleswebappsookstoreookstore1 rc,运行:
asant deploy
3 运行
在浏览器键入:http://<host>:<port>/bookstore1/enter
4 生成javadoc
在J2EE1.4 ampleswebappsookstoreookstore1 rc下运行:
asant javadocs
Stateless SessionBean
Location: J2EE1.4 amples/ejb/stateless/易做图/src
Stateful SessionBean-CartBean
Location: D:DevsJ2EE1.4 amplesejb tateful imple rc
Run:
cd <install_dir>/domains/<domain_name>/applications/j2ee-apps/stateful-易做图/
run : appclient -client stateful-易做图Client.jar -name CartClient –textauth
CMP Customer
Location: D:DevsJ2EE1.4 amplesejbcmpcmpcustomer rc
1 在控制台建立jdbc连接资源,名称为:jdbc/cmpcustomer
2 创建连接池:cmpcustomer-pool
Run: http://localhost:8080/customer/
StorageBin (bmp-Simple) Application
Location: D:DevsJ2EE1.4 amplesejbmp imple rc
How to Run:
In: D:DevsJ2EE1.4domainsdomain1applicationsj2ee-appsmp-易做图
Run:
appclient -client bmp-易做图Client.jar -name StorageBinClient -textauth
MDB
Location: D:DevsJ2EE1.4 amplesejbmdb imple rc
定义资源
1 登陆Server,在Java Message Service 处点击Connection Factories,然后选择New
2 输入:
JNDI-Name: jms/MyQcf Type: javax.jms.QueueConnectionFactory Resource: Select Enabled checkbox
3 点击 Destination Resources 点 New,输入:
JNDI-Name: jms/MyQueue Type: javax.jms.Queue Resource: Select Enabled checkbox
4 运行:
in :D:DevsJ2EE1.4domainsdomain1applicationsj2ee-appsmdb-易做图
run
appclient -client mdb-易做图Client.jar -name SimpleMessageClient –textauth -xml D:DevsJ2EE1.4domainsdomain1config un-acc.xml
补充:Jsp教程,Java技巧及代码