Enterprise Integration Zone is brought to you in partnership with:

Madhuka is Software Engineer and currently works on the Jaggery, UES, WSO2 Gadget Server team. He holds a B.Sc (Hons) degree in Information Technology from the Faculty of Information Madhuka is a DZone MVB and is not an employee of DZone and has posted 52 posts at DZone. You can read more from them at their website. View Full User Profile

Running a Jaggery Javascript App Inside Proxy

03.23.2013
| 1951 views |
  • submit to reddit
In this post I'm going to illustrate how to run a jaggery (javascript) App inside a proxy.

[1] Stop jaggery server if it is running.

[2]Go to <jaggery-Home>/bin/ from CMD

[3]Entry 'server.bat -Dhttp.proxyPort=<proxy-port> -Dhttp.proxyHost=<proxy-host>'
eg:
server.bat -Dhttp.proxyPort=8085 -Dhttp.proxyHost=localhost

Now jaggery server/ Apps will running inside proxy server.

To test this you can try tcp moon. (for http calls)

[4.1]Start tcpmoon
[4.2]Create new tcpmoon proxy that is listerning to that prxoy port (Here is 8085)


image

[4.3]Go to the tap 'port 8085' in tcp moon

[5] Send jaggery web request (You can try it from jaggery documentation)

https://localhost:9443/apidocs/xhr.jag

you will see the page in tryit.jag

[6]Go to tcpmoon port 8085

you will see that message that send from jaggery

image

Published at DZone with permission of Madhuka Udantha, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)