RSS Portlet

The RSS Portlet won't work when there is a proxy in front of the server (Error: Could not access URL with every RSS feed). Does anyone have suggestions on how to configure the proxy server?
[197 byte] By [junya] at [2007-11-26 16:45:01]
# 1

If you want to access external sites through RSS channel, then you have to add your proxy server settings in the domain.xml/server.xml depending on whether your webcontainer is sun Appserver/ sun Webserver

Please add the following :

<jvm-options>-Dhttp.proxyHost=Proxy-Host</jvm-options>

<jvm-options>-Dhttp.proxyPort=Proxy-Port</jvm-options>

<jvm-options>-Dhttp.nonProxyHosts="Portalserver-host"</jvm-options>

SiddeshKamatha at 2007-7-8 23:12:20 > top of Java-index,Web & Directory Servers,Portal Servers...
# 2
We tried this, with no effect. If there is any logging that might be down that we can take a look at to see if these proxy values are being used?
junya at 2007-7-8 23:12:20 > top of Java-index,Web & Directory Servers,Portal Servers...
# 3

you can edit one of the JSPs for the portlet, and add debugging in there to print out the JVM's system properties, such as:

<%

Properties p = System.getPropeties();

%>

Properties: <%=p%>

the portlet uses a standard URLConnection, so it should make use of the JVM proxy settings as described. you can see the interesting file here:

https://portlet-repository.dev.java.net/source/browse/portlet-repository/rsspor tlet/src/java/com/sun/portal/rssportlet/FeedHelper.java?rev=1.2&view=markup

take a look at the getFeed() method.

farble1670a at 2007-7-8 23:12:20 > top of Java-index,Web & Directory Servers,Portal Servers...
# 4
Our proxy requires a username and password. The -D properties of http.proxyUserName and http.proxyPassword are also being set in the JVM properties. Should they be in clear text or encrypted in some form? The HTTP return code is coming back as 407, Proxy Authentication Required.
GDCTGa at 2007-7-8 23:12:20 > top of Java-index,Web & Directory Servers,Portal Servers...
# 5

hi,

a little googling shows a reference to a JVM property "http.proxyAuthType" which can be set to nothing, "basic", or "digest". it's unclear to me whether this is a standard or something that some particular platform is using though.

another link i found suggested that you need to set an instance of Authenticator into the JVM (Authenticator.setDefault()) that knows how to do your authentication. this looks like a good example:

http://www.cenqua.com/fisheye/demo/browse/~raw,r=1.27/ant/src/main/org/apache/t ools/ant/taskdefs/optional/net/SetProxy.java

and:

http://www.mail-archive.com/rpc-user@xml.apache.org/msg00993.html

and:

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=8 8;t=002319

farble1670a at 2007-7-8 23:12:20 > top of Java-index,Web & Directory Servers,Portal Servers...