You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sg...@apache.org on 2001/12/05 19:47:25 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets NewRSSPortlet.java

sgala       01/12/05 10:47:25

  Modified:    src/java/org/apache/jetspeed/portal/portlets
                        NewRSSPortlet.java
  Log:
  Cosmetic changes.
  
  Revision  Changes    Path
  1.13      +7 -6      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/NewRSSPortlet.java
  
  Index: NewRSSPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/NewRSSPortlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- NewRSSPortlet.java	2001/12/04 17:00:31	1.12
  +++ NewRSSPortlet.java	2001/12/05 18:47:25	1.13
  @@ -100,7 +100,7 @@
   is only used for this mime-type</dd>
   </dl>
   @author <A HREF="mailto:raphael@apache.org">Rapha�l Luta</A>
  -@version $Id: NewRSSPortlet.java,v 1.12 2001/12/04 17:00:31 sgala Exp $ 
  +@version $Id: NewRSSPortlet.java,v 1.13 2001/12/05 18:47:25 sgala Exp $ 
   */
   public class NewRSSPortlet extends FileWatchPortlet {
       
  @@ -142,23 +142,24 @@
           }
   
           // read content, clean it, parse it and cache the DOM
  -        try {
  +        try 
  +        {
               final DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance();
               //Have it non-validating
               docfactory.setValidating(false);
               parser= docfactory.newDocumentBuilder();
  +            parser.setEntityResolver(new JetspeedXMLEntityResolver() );
  +
               url = getPortletConfig().getURL();
               String content = JetspeedDiskCache.getInstance().getEntry( url ).getData();
  -            //REMOVE THIS
  -            //System.err.println( content );
   
  -            parser.setEntityResolver(new JetspeedXMLEntityResolver() );
               InputSource isrc = new InputSource( this.cleanse( content ) );
               isrc.setSystemId( url );
               isrc.setEncoding("UTF-8");
               this.document = parser.parse( isrc );
               
  -        } catch ( Throwable t ) {
  +        } catch ( Throwable t )
  +        {
   
               String message = "RSSPortlet:  Couldn't parse out XML document -> " + 
                                 url;
  
  
  

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