From tomcat-user-return-39986-apmail-jakarta-tomcat-user-archive=jakarta.apache.org@jakarta.apache.org Mon Jul 02 01:45:37 2001 Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 18572 invoked by uid 500); 2 Jul 2001 01:45:28 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 18564 invoked from network); 2 Jul 2001 01:45:25 -0000 Received: from dion.sprucegrove.com (HELO sprucegrove.com) (204.171.100.244) by h31.sny.collab.net with SMTP; 2 Jul 2001 01:45:25 -0000 Received: (from jay@localhost) by sprucegrove.com (8.11.0/8.11.0) id f621esp27364 for tomcat-user@jakarta.apache.org; Sun, 1 Jul 2001 21:40:54 -0400 From: "D. Jay Newman" Message-Id: <200107020140.f621esp27364@sprucegrove.com> Subject: Re: [tomcat-user] how to use generic servlets To: tomcat-user@jakarta.apache.org Date: Sun, 1 Jul 2001 21:40:54 -0400 (EDT) In-Reply-To: <01070211034808.28559@host63.syd.nuix.com.au> from "Dmitri Colebatch" at Jul 02, 2001 11:05:20 AM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > hey - this looks interesting. I'm glad you think so. I can use all the help I can get. :) > On Mon, 2 Jul 2001 10:40, D. Jay Newman wrote: > > I'm sorry, but I agree with Nick. > me too > > > > > could someone give me a nice example how to write a web.xml in which i > > > > can use my generic servlet which uses my own protocol? > What sort of a protocol are you looking at? My understanding is that _any_ > request/reply based messaging could be done this way. Well, I'm just looking at sending XML messages back and forth. This could easily be encapsulated into the HTTP protocol, but I don't see any reason to make things more difficult than that are already. > I have no idea about this in practice, but AFAIK I cant see any reason why > you'd need to depart from a standard web.xml file. I'm assuming that the > servlet-class needs to be a Servlet (not HttpServlet). How far have you got > with this? I'd be really interested to hear more. > > btw - on a side note, which may be (vaguely) related. I once tried to create > my own HttpServletRequest and HttpServletResponse types for use within a > servlet, to simulate firing a request to a RequestDispatcher. It didn't work > - the first line of forward was attempted casting my HttpServletRequest to a > tomcat specific class. Not sure how legit what I was doing is, or how legit > tomcat's casting was, but it didn't work. Things like this _might, maybe_ be > of some use to you (o: I've looked at the code of the connectors and such in Tomcat 4.0b5 and found that they are very tightly tied to HTTP. Until now I haven't had enough free time to get anything new done. -- D. Jay Newman ! For the pleasure and the profit it derives jay@sprucegrove.com ! I arrange things, like furniture, and http://www.sprucegrove.com/~jay/ ! daffodils, and ...lives. -- Hello Dolly