Thought I'd report this, to dev, got a bit lost on struts-user. As a side note, since struts-user is so high volume, are there any plans to split it into smaller lists? (though I'm not sure on what basis, perhaps newbie/advanced or basic,tags,validation,population / tiles,multi-app,menus,other / tomcat,websphere,jrun problems..
Ken. -----Original Message----- From: Horn, Ken Sent: 05 April 2002 20:09 To: struts-user Cc: Horn, Ken Subject: BUG: Multiple Servlet mappings problem (Struts 1.0.1) Not sure if this is considered a bug, it may be. Certainly the code needs a catch-all to fix it. I was having trouble getting a <html:form> tag to work, the action in the generated html, was always ="". Having resorted to using <struts:form> which worked (them were days, struts, pre version numbers...), I finally put some debug code in html.FormTag. The problem was, that servlet mapping, that the form tag looks up in the application context was not the one that should have been used. I have many mappings to the ActionServlet, one is *.do, while the rest grab certain specific URL's (legacy JSP's, which get forwardeed to actual JSP's having been through the controller for session checks and logging). The form tag was finding a specific mapping, which fails ALL the tests in getActionMappingURL() (I also have no context path) - resulting in action="". Quick solution: add a catch all (and maybe a warning?) to just use the url provided. (this diff is from the 1.0.1 source, though the latest in cvs has the same problem) *** FormTag.java.orig Fri Apr 5 19:03:05 2002 --- FormTag.java Fri Apr 5 19:03:51 2002 *************** *** 721,726 **** --- 721,728 ---- value.append(servletMapping.substring (0, servletMapping.length() - 2)); value.append(actionMapping); + } else { + value.append(action); } if (queryString != null) value.append(queryString); Real solution: erm don't know. I managed to fix this by placing the *.do mapping last in web.xml, though this does seem very hacky and not particularly stable. Ken.
Received: from ln4p1013pos.ldn.swissbank.com (ln4p1013pos.ldn.swissbank.com [172.16.232.64]) by ln16p1175.ldn.swissbank.com (8.8.6 (PHNE_17135)/8.8.6/WDR gamma evision: 1.4 $) with ESMTP id UAA09506 for <[EMAIL PROTECTED]>; Fri, 5 Apr 2002 20:09:23 +0100 (BST) Received: from virscan4.swissbank.com (virscan4.swissbank.com [192.168.0.7]) by ln4p1013pos.ldn.swissbank.com (8.8.8/8.8.8) with ESMTP id UAA20209 for <[EMAIL PROTECTED]>; Fri, 5 Apr 2002 20:09:21 +0100 (BST) Received: from gate.ldn.swissbank.com (virscan4 [192.168.0.7]) by virscan4.swissbank.com (8.8.8/8.8.8) with ESMTP id UAA18522 for <[EMAIL PROTECTED]>; Fri, 5 Apr 2002 20:05:59 +0100 (BST) Received: (from smap@localhost) by gate.ldn.swissbank.com (8.8.8/8.8.8) id UAA25433 for <[EMAIL PROTECTED]>; Fri, 5 Apr 2002 20:09:19 +0100 (BST) Received: from <[EMAIL PROTECTED]> (unknown [192.18.49.131]) by gate via smap (V2.0) id xma025407; Fri, 5 Apr 2002 20:09:07 +0100 Received: (qmail 12441 invoked by uid 97); 5 Apr 2002 19:09:02 -0000 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:[EMAIL PROTECTED]> List-Subscribe: <mailto:[EMAIL PROTECTED]> List-Help: <mailto:[EMAIL PROTECTED]> List-Post: <mailto:[EMAIL PROTECTED]> List-Id: "Struts Users Mailing List" <struts-user.jakarta.apache.org> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Delivered-To: mailing list [EMAIL PROTECTED] Received: (qmail 12429 invoked from network); 5 Apr 2002 19:09:02 -0000 From: [EMAIL PROTECTED] X-OpenMail-Hops: 1 Date: Fri, 5 Apr 2002 20:08:34 +0100 Message-Id: <H00008bd061a9761.1018033713.ln4p2352.ldn.swissbank.com@MHS> Subject: BUG: Multiple Servlet mappings problem (Struts 1.0.1) MIME-Version: 1.0 TO: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline ;Creation-Date="Fri, 5 Apr 2002 20:08:34 +0100" Content-Transfer-Encoding: 7bit X-WDR-Disclaimer: Version $Revision: 1.15 $ X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>