Hi,
 
I have checked the code but still find it a little bit hard to come with 
something all by myself. I was wondering (although I am afraid I already know 
the answer) is there any book that explains how tomcat (6.0) internally works 
and explains how connectors can be developed for it? I tried searching on 
Amazon but so far I did not have much luck.
 
Regards,
Sim085> To: users@tomcat.apache.org> From: [EMAIL PROTECTED]> Subject: Re: 
Tomcat Custom Connector> Date: Tue, 3 Jun 2008 19:17:03 -0700> > AFAIK, there 
isn't a lot of documentation. But there isn't that much too > it. You need to 
implement a ProtocolHandler > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ProtocolHandler.html)
 > This class is responsible for managing the transport (e.g. ServerSocket) and 
> request threads (but the various EndPoint classes in > 
org.apache.tomcat.util.net may simplify this aspect for you). For best > 
results, this class may implement ActionHook as well > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ActionHook.html).>
 > When a new request comes in, it is the ProtocolHandler's job to initialize a 
> Request > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Request.html) > 
and a Response > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Response.html) > 
objects for it, making certain that they get valid InputBuffer > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/InputBuffer.html)
 > and OutputBuffer > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/OutputBuffer.html)
 > instances to comunicate with the client. Then within the thread, you hand > 
the Request and Response off to the service method of the Adapter > 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Adapter.html) > 
that Tomcat will give to the ProtocolHandler. And that is pretty much it > :).> 
> Using the standard server.xml (as opposed to Embedding), you would configure 
> Tomcat to use your Connector with an element like:> <Connector 
protocol="com.myfirm.mypackage.MyProtocolHandler" ... />> Any other attributes 
in the <Connector /> tag will be passed JavaBean style > to the ProtocolHandler 
to handle init options.> > For the simplest example, look at > 
org.apache.coyote.memory.MemoryProtocolHandler (but this one is mostly > useful 
for unit testing).> > "Simon Aquilina" <[EMAIL PROTECTED]> wrote in message > 
news:[EMAIL PROTECTED]> > Hi,> I am interested in building a custom connector 
for Tomcat. I have checked > the Tomcat source code and found the source code 
for the ‘http11’ and ‘ajp’ > connectors. I thought of trying to understand the 
code of these two > connectors and then try to implement mine based on these. 
However I am no > expert and was wondering if there is any good 
documentation/tutorial on how > a connector can be developed for Tomcat (I 
would later use this connector > with Geronimo).> Just to give you some 
insight; what I want to achieve is to build a custom > connector so that Tomcat 
can understand requests made from a 3rd party > clients who cannot communicate 
using the Http protocol and nor do they > expect data in html format. 
Additionally some of the clients could > communicate on Bluetooth!> I do not 
know if the above is even possible but I am willing to try :)> Thanks for any 
replies,> Regards,Sim085> 
_________________________________________________________________> News, 
entertainment and everything you care about at Live.com. Get it now!> 
http://www.live.com/getstarted.aspx > > > > > 
---------------------------------------------------------------------> To start 
a new topic, e-mail: users@tomcat.apache.org> To unsubscribe, e-mail: [EMAIL 
PROTECTED]> For additional commands, e-mail: [EMAIL PROTECTED]> 
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

Reply via email to