Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Weblogic8.1 - Opening URL connections from within deployed EAR application.

48 views
Skip to first unread message

Dennis Escueta

unread,
Oct 2, 2003, 8:35:18 PM10/2/03
to

I'm trying to migrate an existing Weblogic 6.1 (using jdk1.3.1) EAR application
to Weblogic 8.1
(using jdk1.4.1) that opens up a URL connection to retrieve an XML file from a
web server.

It does this by setting the http.proxyHost, http.proxyPort, proxySet in a java
class that it uses
and opens up a URLConnection. The system properties are not initialised at the
startup (I don't
know why they did that), but it works fine under Weblogic 6.1.

I deployed it on Weblogic 8.1, but I'm getting "Could not open connection with
host and port 80 Error".

I tried setting the http properties at startup using "-Dhttp.proxyHost=.... -Dhttp.proxyPort=...."
re-ran the program and it works. So, why doesnt it work when setting these properties
during
runtime?

Is this due to Weblogic 8.1, or do I need to configure something in Weblogic 8.1
to allow this to occur? Is this due to JDK1.4?

Appreciate the help,
Dennis Escueta


Dennis Escueta

unread,
Oct 3, 2003, 12:47:09 AM10/3/03
to

I have tried setting the permission on the weblogic.policy file for web applications
as well.

// Web App default permissions
grant codebase "file:/weblogic/application/defaults/Web" {
permission java.lang.RuntimePermission "loadLibrary";
permission java.lang.RuntimePermission "queuePrintJob";
permission java.net.SocketPermission "*", "connect";
permission java.io.FilePermission "WEBLOGIC-APPLICATION-ROOT${/}-", "read,write";

// changed-added the following
permission java.util.PropertyPermission "*", "read,write";
permission java.util.PropertyPermission "http.proxyPort", "read,write";
permission java.util.PropertyPermission "http.proxyHost", "read,write";
permission java.util.PropertyPermission "proxySet", "read,write";
};

But modifying System properties from within a web application still does not work.

Is Weblogic 8.1 more strict on changing System properties? Is this documented
somewhere on the online documentations? I can't seem to find it.

0 new messages