dwr3+struts2 deploy on glassfish
0. set java_home and path in enviroment to jdk1.6, remove jdk1.5 from path
1. install glassfish-installer-v2.1.1-b31g-windows-ml.jar
2. java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-windows-ml.jar
3. cd glassfish
4. ant -f setup.xml
0. should working in JDK1.6
1. add sun-web.xml
2. remove
--asm-1.5.3.jar
--asm-attrs-1.5.3.jar
--cglib-2.1_3.jar
--xercesImpl-2.6.2.jar
--xml-apis-1.0.b2.jar
3. add bellow jars
--asm-all-3.3.jar
--backport-util-concurrent-2.2.jar
--cglib-2.2.jar
replace login.jsp
issue:
1. glassfish create more than 10G log files in few mins.
check jre in bellow file. set it as: set AS_JAVA=C:\java\jdk1.6.0_17\jre/..
glassfish\config\asenv.bat
set JAVA_HOME=C:\java\jdk1.6.0_17
set path=%JAVA_HOME%\bin;%path%
java -version
asadmin start-domain domain1
4. exception handling
dwr2+Struts2 can't deploy on glassfish3 linux
(1) dwr exception: session error
resolve method:
change dwr2 to dwr3
no need parameter in web.xml:crossDomainSessionSecurity
(2)struts can't load configration file. java.util.zip.ZipException: error reading zip file
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>*.action</url-pattern>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<!-- For Struts debugging console -->
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
change action name to page name in decorators.xml
上一篇: GlassFish中文FAQ开通
下一篇: GlassFish中文网站上线
推荐阅读
-
Nexus-在项目中使用Maven私服,Deploy到私服、上传第三方jar包、在项目中使用私服jar包
-
Web Deploy发布网站及常见问题解决方法(图文)
-
多模块maven的deploy集成gitlab ci自动发版配置
-
多模块maven的deploy集成gitlab ci自动发版配置
-
Maven deploy部署jar包到远程私仓
-
Hexo异常:fatal:inunpopulatedsubmodule'.deploy_git'怎么解决?
-
Web Deploy远程发布
-
MyEclipse部署Web项目Servers报错:NullPointerException at com.genuitec.eclipse.ast.deploy.core.Deployment
-
Maven将jar包install到本地仓库deploy到远程仓库命令
-
mvn deploy部署报错