You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ma...@apache.org on 2001/11/05 05:51:40 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html FormTag.java

martinc     01/11/04 20:51:40

  Modified:    src/share/org/apache/struts/taglib/html FormTag.java
  Log:
  Fixed FormTag to exclude query string when identifying action mapping name.
  
  PR: 4489
  Submitted by: Robert Buren
  
  Revision  Changes    Path
  1.15      +6 -6      jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java
  
  Index: FormTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FormTag.java	2001/09/17 04:52:58	1.14
  +++ FormTag.java	2001/11/05 04:51:40	1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 1.14 2001/09/17 04:52:58 martinc Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/09/17 04:52:58 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 1.15 2001/11/05 04:51:40 martinc Exp $
  + * $Revision: 1.15 $
  + * $Date: 2001/11/05 04:51:40 $
    *
    * ====================================================================
    *
  @@ -88,7 +88,7 @@
    * properties correspond to the various fields of the form.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2001/09/17 04:52:58 $
  + * @version $Revision: 1.15 $ $Date: 2001/11/05 04:51:40 $
    */
   
   public class FormTag extends TagSupport {
  @@ -691,8 +691,8 @@
           int question = action.indexOf("?");
           if (question >= 0)
               value = value.substring(0, question);
  -        int slash = action.lastIndexOf("/");
  -        int period = action.lastIndexOf(".");
  +        int slash = value.lastIndexOf("/");
  +        int period = value.lastIndexOf(".");
           if ((period >= 0) && (period > slash))
               value = value.substring(0, period);
           if (value.startsWith("/"))
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>