W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 2006

RE: Creating a new server handler?

From: Yves Lafon <ylafon@w3.org>
Date: Wed, 22 Feb 2006 12:03:00 +0100 (MET)
To: "Laird, Brian" <BLaird@havigs.com>
cc: www-jigsaw@w3.org
Message-ID: <Pine.GSO.4.64.0602221143470.28673@gnenaghyn.vaevn.se>

On Tue, 14 Feb 2006, Laird, Brian wrote:

> I haven't had any problems with the servlet filters as of yet.
>
> I can try the ServerInterface but how will the jigsaw startup work?  I 
> thought the classes listed in the server.props file had to be of type 
> ServerHandler.

The ServerHandlerManager is in charge of starting all the servers (it 
reads the server.props, finds the name and the class to start. It should 
be possible to start a tomcat engine from there. Also this class is able 
(on Unix systems) to start the server at root, and change the 
uid/gid/chroot for security reason (hence the "strange" way to do the 
startup).

> One other note, I tried to make a resource out of the tomcat embedded 
> server and it didn't work at all, mainly, because I could not get the 
> tomcat instance to decide it like my requests.

Ah if there is a need to translate request object, it may also have a 
cost, but it's probably doable, with tricks if the streams are not the 
same (you can take a look at the servlet wrapper to see how fun it was to 
mix input and output streams :) ).

> I may try Jetty to see if that interface is any easier to use.  From 
> what I have read so far, tomcat wasn't meant to be embedded in this way 
> but boy it would nice if we could pull it off.

Be it Jetty or Tomcat, any "better" implementation of the servlet stuff is 
welcomed :)
Thanks,

>
> Thanks for the help,
> Brian
>
> -----Original Message-----
> From: Yves Lafon [mailto:ylafon@w3.org]
> Sent: Monday, February 13, 2006 8:02 AM
> To: Laird, Brian
> Cc: www-jigsaw@w3.org
> Subject: Re: Creating a new server handler?
>
> On Tue, 7 Feb 2006, Laird, Brian wrote:
>
>> I am working on creating a new server handler which would startup the
>> embedded version of tomcat (5.5).  I need a little more of a
>> sophisticated servlet/jsp container that what jigsaw offers through the
>> normal stuff.  Plus, I figured it could be added back into the Jigsaw
>> source to be used by other people.
>
> That would be a good interim for a full fledge implementation in Jigsaw
> (the issue I guess is mainly with the servlet filters, no?)
>
>> Anyways, here is my question.  I created a class called TomcatDaemon
>> which extends the following interfaces: ServerHandler,
>> PropertyMonitoring, Status.  I am able to start tomcat and get it to
>> serve up content with no problem.  My issue is that when I open the
>> admin GUI, I get a nice big dialog box proclaiming "Unknown Resource"
>> with a bunch of squares after it.  After clicking "o.k." the GUI does
>> show up but there is nothing in it.  So I can't configure my other
>> regular jigsaw servers the way I want.  How can I get the GUI to either
>> ignore the tomcat daemon instance or show it and just have nothing for
>> the admin to configure?
>
> Could you try to implement ServerInterface? This one is the resource, and
> the gui only deals with resources, so that might explain the issue you are
> facing.
> Thanks,
>
>

-- 
Yves Lafon - W3C
"Baroula que barouleras, au tiéu toujou t'entourneras."
Received on Wednesday, 22 February 2006 11:03:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:37 GMT