Hi Megan: 

Your configuration seems to be right except for one detail. Let me get the
concept straight so you understand it. 

An Enterprise Application (what Orion calls an Application) is a J2EE
deployment unit packaged as an "ear" or "Enterprise Archive". This ear can
contain 0, 1 or more modules (and these modules can be web modules, ejb
modules or client modules).

A "Web Archive" is a deployable "web-archive". These archives are usually
contained inside an "Enterprise Archive" but can be used stand-alone. A
"war" contains a deployable web-application. Since Tomcat and most so called
"Servlet Runners" have no notion of an "Enterprise Application" as defined
by the J2EE spec, they adhere to the "web archive" concept and package that
web-application as such.

Orion on the other hand, is a full Enterprise Server which aims to comply
100% with J2EE specifications. 

If you look at your server.xml, you'll see two kinds of applications... a
"global-application" and an "application". Out of the Box, Orion comes with
an application called "default" which is bound as the "global-application"
pointing to an XML file called "application.xml" .... 

If you are going to deploy just a "war", you need to put it here
(application.xml) as web-module. This can be defined by:

<!-- Use this definition to point to a "war" file -->
<web-module id="struts-documentation" path="struts-documentation.war" /> 

or 

<!-- Use this definition to point to a directory -->
<web-module id="struts-documentation" path="../struts-documentation" /> 

So, enough of theory and let's get to the chase... 

You defined a <web-module> in application.xml .... Therefore, you're
web-application resides in the context of the "default" application, as seen
in the definition of <global-application name="default"
path="application.xml" /> in server.xml .... 

So, you need to define your web-app as:

<web-app application="default" name="struts-documentation"
root="/struts-documentation" />

Just remember that when Orion refers to an "application" in it's config
files, it's actually an Enterprise Application, not a web-application.

If you need more help, We'll be glad to help you!

Victor Salaman

> -----Original Message-----
> From: Megan Ray [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 10, 2000 12:57 PM
> To: Orion-Interest
> Subject: Problem with deploying struts-documentation.war AND 
> any way to
> search archives?
> 
> 
> Hi Mike and Malcolm!  (And Orion-Interest list - moved from 
> jakarta-struts
> list.)
> 
> Thanks for the information.
> 
> Mike, I revised my Orion.xml files as you suggested - but still having
> problems.   (I think there is a "hole" in my understanding of 
> this whole
> setup issue.)
> 
> Here is my current setup:
> 
> My WAR file is         c:\orion\applications\struts-documentation.war
> 
> My application.xml refers to: <web-module id="struts-documentation"
> path="../applications/struts-documentation.war" />
> 
> My default-web-site.xml refers to: <web-app
> application="struts-documentation" name="struts-documentation"
> root="/struts-documentation" />
> 
> Under this setup - Orion initializes fine.   However - when I enter
> "http://localhost/struts-documentation" in a browser, I get 
> the following
> error message:
> 
> Error instantiating web-application
> No application named 'struts-documentation' found in the server
> 
> 
> This leads me to believe that I need to add "something" back to the
> server.xml file.    But when I add the following: <application
> name="struts-documentation" 
> path="../applications/struts-documentation.war"
> />
> 
> to server.xml - Orion does not initialize and I receive the 
> original error
> message (error instantiating application at file
> c:/orion/applications/struts-documentation.war:  unable to find/read/
> assembly information for c:\orion\applications\struts-documentation
> <META-INF/application.xml>)
> 
> OK - so back to my original question - don't I need an 
> application.xml for
> my .WAR?   Do I need to include the application.xml in the WAR file?
> 
> 
> Malcolm - I appreciate your hints.   But what specific 
> element to you mean
> by download the J2EE "stuff" from Sun.   What utility are you 
> referring to
> create the WAR?   I'm obviously an idiot - so any specific 
> information will
> be helpful.
> 
> Thanks again for all of your help!
> 
> 
> 
> -----Original Message-----
> From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 08, 2000 7:36 PM
> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject:      RE: Problem with deploying 
> struts-documentation.war AND any way to
> search archives?
> 
> This is actually not a problem, it's a misunderstanding ;)
> 
> The <application> tag is for J2EE applications, WAR files are "web
> applications", not whole J2EE applications. WARs are one of 
> the modules that
> makes up an EAR.
> 
> There is no need to build an EAR to deploy WAR files in Orion 
> (or any J2EE
> compliant server).
> 
> In your config/application.xml file add:
>       <web-module id="strutsDoc"
> path="d:\scratch\jakarta-struts\webapps\struts-documentation.war" />
> 
> Then in config/default-web-site.xml (or ANY website file) add:
>       <web-app application="default" name="strutsDoc" 
> root="/struts/doc" />
> 
> And any WAR will deploy.
> 
> Hope this helps,
> 
> Mike
> 
> > -----Original Message-----
> > From: Megan Ray [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, 8 July 2000 3:11
> > To: [EMAIL PROTECTED]
> > Subject: Problem with deploying struts-documentation.war 
> AND any way to
> > search archives?
> >
> >
> > I'm a newbie to struts- and web development in general  - 
> trying to deploy
> > it on Orion webserver
> >
> > I followed the instructions for deploying Struts - when I 
> try to start
> > Orion - I get the following error message:
> >
> > "unable to find/read assembly info for
> > c:\orion\applications\struts-documentation 
> <META-INF/application.xml>
> >
> > Here is a summary of my Orion setup for the documentation.war:
> >
> > struts-documentation.war is located in c:\orion\applications
> >
> > the server.xml has the following line added:
> >
> >     <application name="struts-doc"
> > path="../applications/struts-documentation.war"/>
> >
> > the default-web-site.xml has the following line added:
> >
> >     <web-app application="struts-doc" name="struts-documentation"
> > root="/struts-documentation" />
> >
> > Am I setting this up incorrectly?
> >
> > I assume the struts-documentation.war doesn't have the 
> application.xml
> > (required by Orion?)    I thought about trying to deploy the
> > struts example
> > without the war - but the build.bat file will not work (to create
> > directory
> > structure.)
> >
> > Any hints are appreciated.   I would like to access both 
> the documentation
> > and struts example.
> >
> > Thanks!
> >
> > P.S.   Is there any way to search the struts-user e-mail 
> archives?   I'm
> > sure most of my questions have been asked before.
> >
> > Thanks again!
> >
> 
> 

Reply via email to