ate         2005/02/04 09:31:45

  Modified:    
portals-bridges/struts/src/java/org/apache/portals/bridges/struts/taglib
                        TagsSupport.java
  Log:
  (temporary) fix for link and rewrite tag incorrectly stripping a path of a 
contextPath prefix when it really isn't as reported by Jeff Sheets.
  Example: contextPath: /example, path: /exampleSummary.do
  Now only strip contextPath if the path starts with (contextPath + "/").
  Still not a complete fix because a context relative path like 
/example/anotherSummary.do will still incorrectly get the real folder example 
stripped.
  
  Revision  Changes    Path
  1.3       +2 -2      
jakarta-jetspeed-2/portals-bridges/struts/src/java/org/apache/portals/bridges/struts/taglib/TagsSupport.java
  
  Index: TagsSupport.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portals-bridges/struts/src/java/org/apache/portals/bridges/struts/taglib/TagsSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TagsSupport.java  21 Jan 2005 16:28:13 -0000      1.2
  +++ TagsSupport.java  4 Feb 2005 17:31:45 -0000       1.3
  @@ -108,7 +108,7 @@
       {
           url = getContextRelativeURL(pageContext,url,false);
           String contextPath = 
((HttpServletRequest)pageContext.getRequest()).getContextPath();
  -        if (url.startsWith(contextPath))
  +        if (url.startsWith(contextPath + "/"))
           {
               url = url.substring(contextPath.length());
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to