Author: thomas.heute(a)jboss.com
Date: 2008-06-13 06:11:08 -0400 (Fri, 13 Jun 2008)
New Revision: 11025
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/news/NewsPortlet.java
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java
Log:
Use proxy settings
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/news/NewsPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/news/NewsPortlet.java 2008-06-13
09:40:52 UTC (rev 11024)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/news/NewsPortlet.java 2008-06-13
10:11:08 UTC (rev 11025)
@@ -24,6 +24,7 @@
package org.jboss.portal.core.samples.news;
import org.apache.log4j.Logger;
+import org.jboss.portal.common.net.URLTools;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -127,7 +128,7 @@
newURL = request.getPreferences().getValue("RssXml", RSS_URL);
}
- xmlInputStream = new URL(newURL).openStream();
+ xmlInputStream = URLTools.getContentAsInputStream(new URL(newURL), 5000, 5000);
if (xmlInputStream == null)
{
log.error(E_UNREADABLE);
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java 2008-06-13
09:40:52 UTC (rev 11024)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java 2008-06-13
10:11:08 UTC (rev 11025)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.samples.weather;
import org.apache.log4j.Logger;
+import org.jboss.portal.common.net.URLTools;
import org.w3c.dom.Document;
import javax.portlet.ActionRequest;
@@ -118,7 +119,7 @@
newZip = request.getPreferences().getValue("RssXml", RSS_URL_PREFIX
+ DEFAULT_ZIP);
}
- xmlInputStream = new URL(newZip).openStream();
+ xmlInputStream = URLTools.getContentAsInputStream(new URL(newZip), 5000, 5000);
if (xmlInputStream == null)
{
log.error(E_UNREADABLE);
Show replies by date