Skip to main content

What's the proper way to specify an HTTP proxy in jmaki?

1 reply [Last post]
sambayer
Offline
Joined: 2008-07-21
Points: 0

I previously reported this problem as a hang in xhp, but the problem appears to boil down to my inability to specify my firewall settings appropriately.

Here's my current configuration: MacOS X Leopard 10.5.4, Tomcat 5.5.26, jmaki 1.0.3. I try to build and load the jmaki-cl-mashup example, and find the following in my Tomcat log:

java.io.IOException: Server returned HTTP response code: 403 for URL: http://sfbay.craigslist.org/sby/rfs/index.rss?&null
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1170)
at com.sun.jmaki.services.HttpClient.getInputStream(HttpClient.java:96)
at com.sun.jmaki.services.XmlHttpProxy.doGet(XmlHttpProxy.java:79)
at com.sun.jmaki.services.XmlHttpProxyServlet.doGet(XmlHttpProxyServlet.java:181)
...

So I tried to modify samples/cl-mashup/web/java/WEB-INF/web.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>

proxyHost
gatekeeper.mitre.org

proxyPort
80

...

as suggested here:

https://ajax.dev.java.net/xmlhttpproxy.html

but my behavior is unchanged; I still get

"Data format error loading data from http://localhost:8080/jmaki-cl-mashup/xhp?key=cl"

reported as an error in the UI, and I still get the 403 error in the log. If I try to access the URL reported in the log using "curl" in the shell, and pass it my proxy, it works fine.

Any ideas?

Thanks in advance -
Sam Bayer
The MITRE Corporation
sam@mitre.org

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Any chance I could talk you into using the servlet :

jmaki.xhp.XmlHttpProxyServlet

The context properties proxyHost and proxyPort are still the same.

The version you are using is deprecated and might be the problem. We left it in to not break any previous users.

-Greg