users@glassfish.java.net

Re: help w/ deployment structure

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Thu, 19 Jul 2012 10:00:34 -0400

The application.xml is optional so you don't have to include one. If you
don't include one, the context root for web module in your case would
default to "testwebapp-1_0", so when you access your web application,
you need to access under /testwebapp-1_0 instead of /test.

- Hong

On 7/12/2012 4:14 PM, Shane wrote:
> I have a *.war which uses struts and makes calls to an ejb within the
> *.jar file. Both the *.war and *.jar are in a *.ear as follows.
>
> $ jar tvf test-1_0.ear
> 0 Thu Jul 12 12:35:26 GMT-06:00 2012 META-INF/
> 106 Thu Jul 12 12:35:24 GMT-06:00 2012 META-INF/MANIFEST.MF
> 2017 Thu Jul 12 12:35:26 GMT-06:00 2012 test-1_0.jar
> 3766170 Thu Jul 12 12:35:26 GMT-06:00 2012 testwebapp-1_0.war
>
> Currently my META-INF/application.xml file is empty and I'm not sure
> what I should have in that. I also can't seem to locate the index.jsp
> (or index.action) when I put test/index.jsp in the URL of the browser.
> The glassfish server.log is searching for it in domain1/docroot and
> its not there. It is in domain1/applications where my *.ear is
> deployed (using the localhost:4848 page).
>
> If I unpack both of these, from within the *.ear, it looks as follows.
>
>
> |-- META-INF
> | |-- MANIFEST.MF
> | `-- application.xml
> |-- WEB-INF
> | |-- Test.jsp
> | |-- classes
> | | |-- com
> | | | `-- test
> | | | `-- abc
> | | | `-- app1
> | | | `-- TestAction.class
> | | |-- log4j.dtd
> | | |-- log4j.xml
> | | `-- struts.xml
> | |-- index.jsp
> | |-- lib
> | | |-- asm-3.3.jar
> | | |-- asm-commons-3.3.jar
> | | |-- asm-tree-3.3.jar
> | | |-- commons-fileupload-1.2.2.jar
> | | |-- commons-io-2.0.1.jar
> | | |-- commons-lang-2.4.jar
> | | |-- commons-lang3-3.1.jar
> | | |-- freemarker-2.3.19.jar
> | | |-- javassist-3.15.0-GA.jar
> | | |-- ognl-3.0.5.jar
> | | |-- struts2-core-2.3.4.jar
> | | `-- xwork-core-2.3.4.jar
> | `-- web.xml
> |-- com
> | `-- test
> | `-- abc
> | `-- app1
> | `-- TestBean.class
>
>
> Anyone have ideas where I may be going wrong?