社区应用 最新帖子 精华区 社区服务 会员列表 统计排行
  • 1404阅读
  • 0回复

WebLogic上部署J2EE应用程序

楼层直达
级别: 管理员
发帖
27809
飞翔币
1567
威望
888
飞扬币
129967
信誉值
0

J2EE的主要技术:JSP、Servlet、J2EE配置、Ant
环境:Bea WebLogic Server
例子代码:petstore_1.3.1_02_bea.zip、petstore-1_3_1_02.zip

安装配置:
1)解压缩文件
petstore_1.2.1_02_bea.zip,将petstore.domain.jar模板文件拷贝到c:\bea\weblogic81\common\templates\domains目录下
2)启动BEA Weblogic Server8.1的Configuration Wizard
3)选中缺省选项"Create a new WebLogic configuration"并且点击Next。
4)选择"PetStore for WebLogic"模板并点击Next
5)选择"Custom"配置并点击Next
6)点击Next一直到Database(JDBC)Options窗口。选择Yes并点击Next
7)设置PetstorePool口令:在User Password和Confirm User Password中输入"petstore"
8)在同一个窗口中,选择"OraclePetStorePool"标签并且在"User Password"和"Confirm User Password"中输入petstore
9)点击Next直到"Create WebLogic Configuration"窗口
10)点击Create按钮在默认的位置c:\bea\user_projects\domains\petstore中创建新的域
11)点击Done退出Configuration Wizard
12)打开一个命令行窗口启动PetStore Administration Server:
cd c:\bea\userprojects\domains\petstore startPetStoreWebLogic.cmd
13)再打开一个命令行窗口并且运行PetStore域中的Ant脚本初始化PointBase数据库
cd c:\bea\userprojects\domains\petstore setPetStoreEnv.cmd
cd c:\bea\userprojects\domains\petstore\do.setup ant
14)停止PetStore Administration Server服务器。关闭步骤12中启动PetStore Administration Server的命令行窗口

创建和部署PetStore
解压缩文件petstore-1_3_1_02.zip到c:\petstore1.3.1_02目录中
1)在编译PetStore应用之前,必须将C:\bea\user_projects\domains\petstore\src目录中的文件拷贝并覆盖c:\petstore1.3.1_02\src中已存在的文件
2)打开一个命令行窗口并执行cd c:\petstore1.3.1_02\src
3)使用文本编辑器打开build.properties文件并编辑下面属性反映实际的安装路径
4)保存对build.properties文件的改动并退出
5)在相同的命令行窗口中,执行下面命令
cd c:\bea\userprojects\domains\petstore setPetStoreEnv.cmd
cd c:\petstore1.3.1_02\src ant
6)拷贝编译完的文件到c\bea\userprojects\domains\petstore\applications目录中:
copy c:\petstore1.3.1_02\src\apps\admin\build\petstoreadmin.ear c:\bea\user_projects\domains\petstore\applications
copy c:\petstore1.3.1_02\src\apps\opc\build\opc.ear c:\bea\user_projects\domains\petstore\applications
copy c:\petstore1.3.1_02\src\apps\petstore\build\petstore.ear c:\bea\user_projects\domains\petstore\applications
copy c:\petstore1.3.1_02\src\apps\supplier\build\supplier.ear c:\bea\user_projects\domains\petstore\applications
7)启动petstore域Administration Server部署新的应用cd c:\bea\user_projects\domains\petstore startPetStoreWebLogic.cmd
8)等待服务器启动后就可以通过浏览器
http://localhost:7001/petstore
访问应用了