taylor      2004/08/06 16:03:25

  Modified:    components/deploy-tool/src/java/org/apache/jetspeed/tools/deploy
                        JetspeedWebApplicationRewriter.java
  Log:
  adding support for missing web.xml -- auto deploy now allows for portlet app war 
files deployed without a web.xml
  we now create a new web.xml, include it in the deployment, and infuse the jetspeed 
container servlet
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.7       +5 -1      
jakarta-jetspeed-2/components/deploy-tool/src/java/org/apache/jetspeed/tools/deploy/JetspeedWebApplicationRewriter.java
  
  Index: JetspeedWebApplicationRewriter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/components/deploy-tool/src/java/org/apache/jetspeed/tools/deploy/JetspeedWebApplicationRewriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JetspeedWebApplicationRewriter.java       5 Aug 2004 23:30:30 -0000       1.6
  +++ JetspeedWebApplicationRewriter.java       6 Aug 2004 23:03:25 -0000       1.7
  @@ -223,6 +223,7 @@
           List elementsBeforeList = Arrays.asList(elementsBefore);
           toInsert.detach();
           int insertAfter = 0;
  +        int count = 0;
           for (int i = 0; i < allChildren.size(); i++)
           {
               Element element = (Element) allChildren.get(i);
  @@ -231,11 +232,14 @@
                   // determine the Content index of the element to insert after
                   insertAfter = root.indexOf(element);
               }
  +            count++;
           }
       
  +        insertAfter = (count == 0) ? 0 : insertAfter + 1;
  +        
           try
           {
  -            root.addContent((insertAfter + 1), toInsert);
  +            root.addContent(insertAfter, toInsert);
           }
           catch (ArrayIndexOutOfBoundsException e)
           {
  
  
  

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

Reply via email to