[jboss-cvs] jboss-seam/src/pdf/org/jboss/seam/pdf/ui ...

Norman Richards norman.richards at jboss.com
Wed Jan 17 21:29:03 EST 2007


  User: nrichards
  Date: 07/01/17 21:29:03

  Modified:    src/pdf/org/jboss/seam/pdf/ui  UIImage.java
  Log:
  cleanup tomcat deployment issues
  
  Revision  Changes    Path
  1.9       +11 -2     jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIImage.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIImage.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIImage.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- UIImage.java	14 Jan 2007 18:14:40 -0000	1.8
  +++ UIImage.java	18 Jan 2007 02:29:03 -0000	1.9
  @@ -3,6 +3,8 @@
   import org.jboss.seam.pdf.ITextUtils;
   
   import javax.faces.context.*;
  +
  +import java.net.MalformedURLException;
   import java.net.URL;
   
   import com.lowagie.text.*;
  @@ -102,8 +104,15 @@
       }
   
       public void createITextObject(FacesContext context) {
  +       
           resource = (String) valueBinding(context, "resource", resource);
  -        URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
  +        
  +        URL url;
  +        try {
  +            url = context.getExternalContext().getResource(resource);
  +        } catch (MalformedURLException e) {
  +            throw new RuntimeException(e);
  +        }
           if (url == null) {
               throw new RuntimeException("cannot locate image resource " + resource);
           }
  
  
  



More information about the jboss-cvs-commits mailing list