Re: Understanding XML files

2001-05-04 Thread Stan Ng

 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.


For really quick and dirty jsp testing, it's easiest to just create them
within the orion/defaul-web-app directory and have them easily available at
the root of the webserver.  the only thing you have to do is remember to
copy the tools.jar from the jdk into the orion directory and you're ready to
go.  not much good for real development, but handy if you're just playing
around with JSPs.





RE: Understanding XML files

2001-05-03 Thread Mike Cannon-Brookes

Scott has put a lot of work into this document, so I'll try and do a mental
brain dump of all the things left out / wrong.

Don't get me wrong - this is an excellent document with a few corrections
(see below).

If people add their thoughts / experiences to it over the next few days,
I'll put up a summary of all the contributions under one doc on
OrionSupport.

Read on...

-mike

 Subject: Understanding XML files

 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

These are both just web-site.xml files ( see
http://www.orionserver.com/docs/web-site.xml.html ). Default-web-site.xml is
just the 'default' website set up when Orion is installed , the contents of
it's WAR are at ./default-web-app (read on for more details)

 +++

 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.

Note you cannot have two web-apps with the same root (and you can only have
one default-web-app - this is fairly obvious I guess). I don't know what
happens if you have directories in one web-app (eg WAR A has /foobar) that
overwrite another web-app's root (eg you bind WAR B to /foobar). My guess is
the second web app would work and the first wouldn't (I don't think this is
documented anywhere, shouldn't be too hard to test though)

 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 /

This is setup by default in the install, so as to make the default web site
work. (See above). Feel free to remove this for a production machine.

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.

Or multiple IPs. Or SSL and non SSL sites (possibly same IP/domain but two
web-site 's)

 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
 +++

This is a bit of a misnomer (I've complained to the orion guys about this
file, it's misnamed). It's actually not an application.xml file in the J2EE
sense (the descriptor for an EAR), it's an orion-application.xml file (the
app-server specific deployment descriptor for an EAR) - see the tags inside
it to confirm if you want.

 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.

When creating your own applications, you need to create your own
application.xml. Orion will create the orion-application.xml file for you
and you can tweak it from there.

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

True. If you want to deploy a simple WAR file under Orion (using the
default, factory configuration settings) you add it as a web-module to
this file (./config/application.xml) and then add a web-site to
./default-web-site.xml and you're set. (This is what Scott say's verbosely
below ;))

 Creating a quick and dirty JSP
 ++
(this is actually a quick and dirty web app)

 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 

Re: Understanding XML files

2001-05-03 Thread joey sark

YE Scott, this is just what I needed! THANX!!!

SCOTT FARQUHAR [EMAIL PROTECTED] wrote:
 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
 
 


end


Get free email and a permanent address at http://www.netaddress.com/?N=1