I'm still learning about this, but here's my attempt at a primer to understand how the 
xml files fit together.

Please feel free to correct any omissions or inaccuracies.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Default-web-site.xml / web-site.xml
+++++++++++++++

This represents a website.  Because you may be serving multiple web sites on one box 
(either for multiple IP's, or multiple domains - ie. orionsupport.com and 
opensymphony.com could be on the same box), you configure a web-site.xml for each of 
them.

Inside this file you configure a default-web-app & multiple web-apps.  The parameters 
to these tags are as follows:

        <default-web-app application="default" name="defaultWebApp" />
        <web-app application="EJBDemo" name="ejbdemo-web" root="/ejbdemo" />
        <web-app application="taglib-test" name="sitemesh-example" root="/sitemesh" />

application:    the application as defined in server.xml (tag in server.xml is 
"application", and the parameter is "name").  ie. from above I have an application 
named EJBDemo in server.xml

name: the web application's name as defined in that particular application.  ie.  
Inside my application.xml for EJBDemo, there is a web-application named "ejbdemo-web".

root:  where you web-app is rooted on the tree.  From the above "localhost/ejbdemo/" 
would correspond with the web-app "ejbdemo-web" in application "EJBDemo".


Server.xml
++++++++++

There is only one of these per server, so it is the root point for all the other files.

Of particular note are the lines:
        <web-site path="./default-web-site.xml" />
        
         <application name="EJBDemo"
                path="c:\scott\javadev\ejbdemo\build\ejbdemo.ear" />
                        
These lines show me what websites and what applications I have running.  You would 
only need multiple web-site's if you are serving multiple domains.

On the other hand, you may have many applications.  If you have many web-applications 
you will need to add them into your websites as listed above.

Application.xml
+++++++++++++++

If you are creating a full-blown application, you are best to create a separate one of 
these for each application.  Inside here you define modules.  These can be web 
modules, ejb modules, or java modules.

If they are web modules, you will want to add them to a website in order to view them.


Creating a quick and dirty jsp
++++++++++++++++++++++++++++++
However - many people have asked about quickly deploying a jsp in a default way.  In 
this case you are probably best to modify the file application.xml that resides in 
/config/ with the other xml files.

Simply add a web module to this file, and then add that particular web module to your 
default-web-site.xml

eg. You want to create a web-app called "jsp-test" that will be show at 
"localhost/jsp-test/"

+ Create the directory "jsp-test" under orion - ie "orion/jsp-test"
+ add the following line to "orion/config/application.xml"
        <web-module id="jsp-test" path="../jsp-test" />
+ add the following line to "orion/config/default-web-site.xml"
                        <web-app application="default" name="jsp-test" 
root="/jsp-test" />
+ create the directory "web-inf" under jsp-test - ie "orion/jsp-test/web-inf"
+ copy the file "web.xml" from "orion/default-web-app/web-inf/web.xml" to 
+"orion/jsp-test/web-inf/web.xml"
+ if you wish to add anything (ie servlets), add them to the file 
+"orion/jsp-test/web-inf/web.xml"
+ start the server.

You should be able to view jsp's that are put in "orion/jsp-test" now at 
"localhost/jsp-test".
                        
                        
More information
++++++++++++++++
www.orionsupport.com
www.orionserver.com/tutorials/
www.jollem.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Scott


>>> [EMAIL PROTECTED] 05/04/01 01:02am >>>
Thanks Johan, Scott, and Tim

I did try to reconcile and follow all of your advice; I did learn something,
but basically it's all gummed up now.

what's missing here for me is:

a fundamental understanding of the relationships between
server, website, web app, web module, 
 --and-- 
global application, default web app

,what files these should be defined in, and where these file go.

for expample, is the default web app just another app, or is it a special
thing that must be there untampered-with.

It's all pretty bewildering to a newbie, and nowhere on orion site do i see a
straightforward explanation/primer of the above. AFTER I grasp this, i'm less
likely to ask dumb config questions or make things worse.

thanks to anyone who can point me in the right direction.

j


Reply via email to