一、forEclipse
介绍: http://glassfishplugins.java.net/
下载:http://ajax.java.net/eclipse/plugins/,http://ajax.java.net/eclipse/features/
eclipse install: http://download.java.net/glassfish/eclipse/helios
二、gl3\gl\domains\domain1\config\domain.xml
1、端口号
<network-listeners> <!--http、https、admin相应端口号-->
<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
。。。。。。
<http-service>
<access-log></access-log>
<virtual-server id="server" network-listeners="http-listener-1,http-listener-2"></virtual-server> <!--8080、8081、4848端口,去掉即可停用相应端口的服务-->
<virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
</http-service>
。。。。。。
即:默认web端口号80,控制台http://localhost:4848/
三、错误
1、org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
。。。 。。。 。。
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: InputStream cannot be null
-----------将opM的6个包当到:D:\gl3\gl\domains\domain1\lib下,不修改其他配置,会引起此错误。admin 不出现用户名、密码窗口
2、[#|2011-12-16T08:21:12.546+0800|WARNING|oracle-glassfish3.1.1|org.apache.catalina.connector.Request|_ThreadID=18;_ThreadName=Thread-2;|PWC4011: Unable to set request character encoding to UTF-8 from context /maWei.sciMan, because request parameters have already been read, or ServletRequest.getReader() has already been called|#]
------------------------Ignoring this warning
If your logfile is filling up with this warning and you'd like to ignore it, just add the following to the logging.properties for your domain (probably GLASSFISH_HOME/glassfish/domains/domain1/config/logging.properties):
org.apache.catalina.connector.Request.level=SEVERE
3、发布应用或启动时,java.lang.OutOfMemoryError: PermGen space
进入glassfish3\glassfish\domains\domain1\config
<jvm-options>-XX:MaxPermSize=192m</jvm-options>--默认,改为256?
参考:http://blog.csdn.net/Jerry_Ran/article/details/4132956
4、在eclipse下启动glf,提示启动错误java.lang.NullPointerException-java.lang.NullPointerException
要注意新建glf服务器时的jdk(新建>配置运行时环境>已安装的服务器运行时>选中glf,编辑or删除重建)和loginname\pw是否正确
单独启动
glassfish3\glassfish\bin\startserv.bat