Well, I am in the process of managing things myself, What I do:
I start a service called jetty
It has the interface WebServer and the implementation WebServerImpl. I
did not take the other 2 classes from PhoenixJetty.
In the WebServerImpl's configure method I prepare Jetty by hand with a
standard Jetty config file, I then get all the HttpContexts in the
Server and associate them the ServiceManager. Now I am in the process of
trying to get the ServiceManager directly from the JSP with the help of
the implicit "application" object present in JSP pages. I hope I am on
the right track to stay Avalon standard.
My association to the HttpContext code in WebServerImpl
(Note that the Hardcoded file path will come from the XCONF file
eventually.):
try
{
// Instantiate the Jetty Server.
// -----------------------------
gJettyServer = new Server (
"C:/projects/GlobalTrustProxy/GlobalTrustProxy/etc/jetty/okiok.xml" );
// Prepare a Servlet handler to put the ServiceManager in it.
// ----------------------------------------------------------
HttpContext[] lContexts = gJettyServer.getContexts();
for( int i = 0 ; i < lContexts.length ; i++ )
{
lContexts[i].setAttribute("ServiceManager", gServiceManager);
}
}
Here is the way I recover it from the JSP (again forget about the
hardcoded values, I will change this afternoon):
ServiceManager sm = ( ServiceManager ) application.getAttribute(
"ServiceManager" );
CommService cs = (CommService) sm.lookup(CommService.ROLE);
out.println(cs.getString());
For the moment, the above example works fine, I can display the String
returned from CommService.
Is this standard enough?
Dominique Paquin
>>-----Original Message-----
>>From: Howard Henson [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, May 29, 2003 11:21 AM
>>To: Avalon framework users
>>Subject: RE: Integrating Jetty with Phoenix
>>
>>
>>You should be able to port the Jetty-Phoenix stuff to Fortress with to
>>much hassel. The only dependency on Phoenix is the use of the
BlockContext
>>which is used to derive the application base directory.
>>
>>I hope to finally release the updated code this week. If you want I
will
>>let you know when and you can take a look.
>>
>>Regards
>>
>>Howard
>>
>>> -----Original Message-----
>>> From: Dominique Paquin [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, May 28, 2003 4:04 PM
>>> To: 'Avalon framework users'
>>> Subject: RE: Integrating Jetty with Phoenix
>>>
>>>
>>> Hi all
>>>
>>> Anyone knows of an equivalent of Jetty-Phoenix but for
>>> Excalibur/Fortress?
>>>
>>> Dominique Paquin
>>>
>>> >>-----Original Message-----
>>> >>From: news [mailto:[EMAIL PROTECTED] On Behalf Of Timothy
Bennett
>>> >>Sent: Wednesday, May 28, 2003 10:00 AM
>>> >>To: [EMAIL PROTECTED]
>>> >>Subject: Re: Integrating Jetty with Phoenix
>>> >>
>>> >>I'm using Howard's Jetty-Phoenix block quite happily.
>>> Would like the
>>> >>jetty-phoenix.jar that I'm using and maybe the source
>>> project? Works
>>> very
>>> >>nicely... Let me know...
>>> >>
>>> >>
>>> >>"Melvin Dave P. Vivas MCOM/3794" <[EMAIL PROTECTED]> wrote in
>>> message
>>> >>news:[EMAIL PROTECTED]
>>> .local...
>>> >>>
>>> >>> I'm using the Jetty-Phoenix port by Howard Henson which I
>>> downloaded
>>> >>from
>>> >>> the sourceforge site. I think I'm just missing a library.
>>> I copied
>>> all
>>> >>> jars from Jetty/lib and phoenix/lib and I get this dependency.
>>> >>>
>>> >>> By the way, where can I get the Sevak package?
>>> >>>
>>> >>> Thanks.
>>> >>>
>>> >>> Melvin
>>> >>>
>>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> >>>
>>> >>> Buildfile: build.xml
>>> >>>
>>> >>> compile:
>>> >>> [javac] Compiling 8 source files to
>>> >>> /home/user/apps/Jetty-Phoenix/build/classes
>>> >>>
>>> >>> phoenix-xdoclet:
>>> >>> [mkdir] Created dir:
>>> >>> /home/user/apps/Jetty-Phoenix/build/metagenerate
>>> >>>
>>> >>> BUILD FAILED
>>> >>> file:/home/user/apps/Jetty-Phoenix/build.xml:127: taskdef class
>>> >>>
org.apache.avalon.phoenix.tools.metagenerate.MetaGenerateQdoxTask
>>> cannot
>>> >>> be found
>>> >>>
>>> >>> Total time: 3 seconds
>>> >>>
>>> >>>
>>> >>>
>>> >>> On Tue, 27 May 2003, Peter Royal wrote:
>>> >>>
>>> >>> > On Tuesday, May 27, 2003, at 02:28 AM, Melvin Dave P. Vivas
>>> MCOM/3794
>>> >>> > wrote:
>>> >>> > > How do I make Jetty run as a block in Avalon-Phoenix?
>>> >>> > > I downloaded the port Jetty-Phoenix but I seem to have
trouble
>>> >>> > > resolving the dependency libraries...
>>> >>> >
>>> >>> > You're using the Sevak package from avalon-sandbox?
>>> >>> >
>>> >>> > If so, could you be a bit more descriptive with what
>>> troubles you
>>> are
>>> >>> > encountering?
>>> >>> > -pete
>>> >>> >
>>> >>> >
>>> >>> >
>>>
---------------------------------------------------------------------
>>> >>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>> >
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>------------------------------------------------------------
>>> ---------
>>> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>>
>>The information in this e-mail is confidential and may be legally
>>privileged. It is intended solely for the addressee and access to
this e-
>>mail by anyone else is unauthorised. If you are not the intended
>>recipient, any disclosure, copying, distribution or any action taken
or
>>omitted to be taken in reliance on it is prohibited and may be
unlawful.
>>Views and opinions are those of the sender unless clearly stated as
being
>>that of the Company's. The Company can not assure that the integrity
of
>>this communication has been maintained nor that it is free of errors,
>>virus, interception or interference. No liability, whether direct or
>>indirect, is accepted by the company, nor the sender should this
e-mail,
>>or any attachment thereto, contain any form or manner of an error or a
>>virus.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]