Re: Changing initial root resource

Mark Friedman writes:
 > I would be happy to just set the property. What do I set it to? It wants
 > a resource name which httpd.initialize() eventually looks up in the root
 > resource store. How do I get that resource name (that I specify as the
 > value of the w3c.jigsaw.root.name property) mapped to the my resource in
 > the root resource store?

Easier to set it before you call initialize. You either have to know
the name before hand. Otherwise , the best thing is to start the
server normally (initialize), introspect its root store to find the
nam,e of avail resources, and then use the changeRoot method.

 > Also, can I set the property at any time or do I need to set it before
 > httpd.initialize() or some other time?

There are methods for changing the root of the server on the fly
(that's how when you change the root through Jigsaw, the change
actaully happens)

 > Thanks in advance.
 > 
 > As an aside, how did the default "root" resource get set up?

A long process...
a) create an empty directory resource (DirectoryResource has a main
   method, or maybe the SimpleResourceStore has one) in a single
   store.
b) In w3c.jigsaw.indexer, there is a bootstrap variable, set it to
   true
c) run Jigsaw, setup the Admin directory, etc.

You're done.

Anselm.

 > -Mark
 > 
 > Anselm Baird_Smith wrote:
 > 
 > > Mark Friedman writes:
 > >  > Assuming I have my own main() method which starts up jigsaw, how
 > > might I
 > >  > programmatically set that Jigsaw server's root resource (preferably
 > >
 > >  > before the server starts up)?
 > >
 > > I guess you want to start from scratch (?) ie no config available yet
 > > ?
 > >
 > >  > What confuses me is how to get the root resource stuff
 > > bootstrapped. I'd
 > >  > like to just set the w3c.jigsaw.root.name property, but that
 > > resource
 > >  > name needs to get associated with a resource in the root resource
 > > store.
 > >  > How do I get that association made before the server starts up
 > > (i.e.
 > >  > before my call to httpd.initialize())? Or is there some other way?
 > >
 > > If you don't know before hand you're probably in trouble (you would
 > > have to go in the store directorectory and try to understand the root
 > > store  file to know what is there).
 > >
 > > Otherwise, just setting the proerty should work fine (I guess that's
 > > not whatyou're looking for though ?)
 > >
 > > Anselm
 > 
 > 
 > 
 > 

Received on Thursday, 5 June 1997 02:47:55 UTC