CSDN博客

img xhp317

Glassfish初试

发表于2008/10/2 21:11:00  278人阅读

 GlassFish与SUN SDK,SUN Application Server的关系:

GlassFish Distributions ,也就是基于GlassFish开发的版本有:

* Sun's Java System Application Server PE 9.0 Beta
* NetBeans 5.5 Enterprise Pack preview
* Java EE 5 SDK preview

一、安装GlassFish

从以下地址:https://glassfish.dev.java.net/public/downloadsindex.html
下载 Milestone binary builds Linux 版本: b32g-glassfish-linux.jar size 77M

在安装GlassFish之前请需事先安装设置好以下环境 /etc/profile
#config java
系统需要安装J2SE 5.0
export JAVA_HOME=/usr/local/jdk1.5.0_06
export PATH=/usr/local/jdk1.5.0_06/bin:$PATH

#config ant
export ANT_HOME=/usr/local/apache-ant-1.6.2
export PATH=/usr/local/apache-ant-1.6.2/bin:$PATH

然后运行 java -Xmx256m -jar glassfish-installer-9.0-b32g.jar

cd glassfish

运行 ant -f setup.xml

将系统安装在: /usr/local/glassfish/
系统默认的 administration 属性值有:
domain.name="domain1"
instance.name="server"
admin.user="admin"
admin.password="adminadmin"
admin.port="4848"
instance.port"="8080"
orb.port="3700"
imq.port="7676"
https.port="8181"

二、运行GlassFish

cd /usr/local/glassfish/bin
[root@fc3-3 bin]# ./asadmin start-domain domain1

打开浏览器,输入
http://192.168.1.3:8080/



Logon to the Administration Console

http://192.168.1.3:4848/
user name: admin
password: adminadmin




三、构建您的第一个 GlassFish 应用程序

下载hello.war
cp hello.war domains/domain1/autodeploy/
或用 asadmin deploy 的方式部署应用, 另外 asadmin updeploy 卸载应用
通过asadmin deploy --help 和 asadmin undeploy --help 获得更多帮助

http://192.168.1.3:8080/hello


运行 asadmin stop-domain domain1 可关闭服务器

四、Java BluePrints Solutions Catalog for GlassFish

下载blueprints,包含Ajax & JSF的组件和代码
运行java -jar bpcatalog-ee5-ea-v0.4-installer.jar进行安装
文件安装在 bpcatalog-ee5-ea-v0.4 目录下
cp bpcatalog.war 和 apps/webtier/目录下的文件到 domains/domain1/autodeploy/ 目录

http://192.168.1.3:8080/bpcatalog





五、在线学习

* Introducing Java EE 5 SDK Preview
http://download.java.net/javaee5/screencasts/sdk-intro/index.html

* Admin Console Overview
http://download.java.net/javaee5/screencasts/admin-console/index.html

* Deploying and Launching Applications using Admin Console
http://download.java.net/javaee5/screencasts/deployment/index.html

六、参考资料

--GlassFish Project
--GlassFish Quick Start Guide
--Java EE 5 SDK Preview
0 0

相关博文

我的热门文章

img
取 消
img