dgraham     2003/03/17 18:46:02

  Modified:    src/share/org/apache/struts/taglib/tiles InsertTag.java
  Log:
  Only include page if it's != null.
  
  Revision  Changes    Path
  1.14      +13 -5     
jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java
  
  Index: InsertTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- InsertTag.java    18 Mar 2003 02:42:59 -0000      1.13
  +++ InsertTag.java    18 Mar 2003 02:46:01 -0000      1.14
  @@ -871,11 +871,16 @@
                   if (flush) {
                       pageContext.getOut().flush();
                   }
  -                doInclude(page);
  +                
  +                if ((page != null) && (page.length() > 0)) {
  +                    doInclude(page);
  +                }
  +                
               } catch (IOException ex) {
                   processException(
                       ex,
                       "Can't insert page '" + page + "' : " + ex.getMessage());
  +                    
               } catch (IllegalArgumentException ex) { // Can't resolve page uri
                   // Do we ignore bad page uri errors ?
                   if (!(page == null && isErrorIgnored)) {
  @@ -887,6 +892,7 @@
                               + "'. Check if it exists.\n"
                               + ex.getMessage());
                   }
  +                
               } catch (ServletException ex) {
                   Throwable realEx = ex;
                   if (ex.getRootCause() != null) {
  @@ -899,10 +905,12 @@
                           + "] "
                           + realEx.getMessage()
                           + "'");
  +                        
               } catch (Exception ex) {
                   processException(
                       ex,
                       "[Exception in:" + page + "] " + ex.getMessage());
  +                    
               } finally {
                   // restore old context
                   // done only if currentContext not null (bug with Silverstream ?; 
related by Arvindra Sehmi 20010712)
  
  
  

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

Reply via email to