From carlos@aper.net Mon Jun 5 20:12:51 2000 Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 92710 invoked from network); 5 Jun 2000 20:12:51 -0000 Received: from unknown (HELO diginetserv01.diveo.com.ar) (200.51.67.51) by locus.apache.org with SMTP; 5 Jun 2000 20:12:51 -0000 Received: from orbos (200.51.12.170 [200.51.12.170]) by diginetserv01.diveo.com.ar with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id L2DXJV3Y; Mon, 5 Jun 2000 17:14:14 -0300 Message-ID: <012301bfcf2a$d22ffe80$e900a8c0@oficina.com.ar> From: "Carlos Pita" To: References: <009101bfcf08$15a84320$e900a8c0@oficina.com.ar> Subject: RE: ApJServMount status Date: Mon, 5 Jun 2000 17:15:34 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi again! I was looking the CVS tree and I've some kind of beta answer to myself. I'd like to commit the changes exposed here into (at least) my tomcat sources but I think it would be better to get somebody else's points on this first. "What's you solution?" i hear you asked. Here it's: (If some(posibly every)thing here is wrong please consider that I met the CVS tree for the first time 2 hours before writing this) The situation: First, the AJP12ConnectionHandler makes a nice AJP12RequestAdapter (which is a specific case of RequestImpl). The request has useful fields like context, serverName and requestURI, between others, which the rest of the world sees from the HTTPServletRequest class interface. These fields are filled by AJP12ConnectionHandler when processConnection'ing by the invokation of readNextRequest method of the request adapter. Then the connection handler wants to call the service method on the right servlet so, not knowing how to do this by himself, it asks for help to the context manager's service method, passing it the request as an argument. The context manager then needs a servlet wrapper in order to invoke the method handleRequest that will eventually call the appropiate service method. So it gets on the task of finding that wrapper calling contextMap on each of the configurated RequestInterceptors. One of these interceptors will be SimpleMapper1 which would get the serverName and the requestURI from the request and put them into the variables host and path. Then it will call getLongestPrefixMatch (which is a method of an asociated PrefixMapper) passing the args host and path and this polite method will return a container that will (finally!) bring the wrapper into life. The problem: So the problem is: the context info is neither in the requestURI nor (obviously) in the serverName. If the requestURI is prefixed with the right context, everything is fine. But when the context is not prefixing the requestURI, the wrapper obtained will belong to a wrong context (perhaps an inexistent one). The solution: To pass to getLongestPrefixMatch a string fixed by substituting the mapped URI path with the right context to which it's mapped (this is unnecesary when they're the same). This doesn't imply to change the requestURI, only to temporarily generate and pass the suggested parameter to getLongestPrefixMatch. ----- Original Message ----- From: Carlos Pita To: Sent: Monday, June 05, 2000 1:06 PM Subject: ApJServMount status Hi! I'm very confused using the ApJServMount directive. I can't get URLs paths (in the first argument to ApJServMount) correctly mapped to the indicated context (in the second argument to ApJServMount). I'm asking here in the dev list because I need to know how well is the directive implemented, how could I help if there's some work pending and if I should use JServ for my web applications meanwhile. I have seen a number of questions without answer on this. I hope someone could give me a hint. Thank you in advance, Carlos.