GWT dev mode not accepting requests forwarded through router - gwt

Our application uses the PayPal api, in order to test it PayPal needs to be able to post data to a serlvet on our servers. This is no problem in production however when running in GWT-Dev mode I cannot seem to get GWT to work through my home router. GWT is running on port 8888 and I have added the needed firewall rules to get this to work.
Does GWT somehow stop requests from working from outside the local area network? I tried -bindAddress 192.167.x.x but it did not work.

For security reasons the jetty server used in gwt dev mode only binds to localhost.
If you want to bind it to all intefaces use the parameter -bindAddress 0.0.0.0
To make sure the servlets are reachable try to connect from a different host on your network (e.g. with Telnet).

Related

Jupyter websocket issue

I have a debian Jupyter running on port 8888.
I want to make it easier to connect to my server,so I have a node.js
app running that forwards request to jupyter.mydomain.com:80 to
port 8888, andother domains to other ports.
This way I dont have to remember the ports of different apps, and instead
can refer to the server with different dns names. All the different names
are setup as a links in the dns server.
Now Jupyter works this way; but the Websockets that report the result of
calculations do not due to security error.
Is there any setting how I can get this to work?
Regards
Andreas
node-http-proxy is a node proxy that supports websockets. Your node app that's proxying requests must also proxy websocket connections.
JupyterHub is a multi-user server for spawning and authenticating single-user notebook servers, and it uses configurable-http-proxy, a subclass of node-http-proxy that adds some live configuration, to relay connections to notebooks. If you use NHP or CHP for your proxy app, the websockets should work.
From the node-http-proxy readme:
You can activate the websocket support for the proxy using ws:true
in the options.
//
// Create a proxy server for websockets
//
httpProxy.createServer({
target: 'ws://localhost:9014',
ws: true
}).listen(8014);

How to debug Json between Local IIS Website and Local

I'm really struggling to know what the problem is here...
I have 2 websites configured in IIS...
**PH.Website** (STANDARD MVC PROJECT)
**PH.Api** (MVC WEB API PRIOJECT)
When you hit the PH.Website it uses a WebClient class in one of the controllers to download data from the PH.Api. However fiddler only sees traffic going to the PH.Website not the PH.Api.
After reading around on the internet I apparently have to do some configuration of the Syste.Net in the Web Api Project. So I added...
<system.net>
<defaultProxy>
<proxy
usesystemdefault="False"
bypassonlocal="True"
proxyaddress="http://PH.Api"
/>
</defaultProxy>
</system.net>
But still no luck. I know the request is happening I just cant see it.
Whats even more confusing is when I configure Fiddler to use Port 80 its says it cannot listen on that port. But hang on if it cant listen on 80 then how the hell can it see traffic on the Http port:80 anyway?
P.s. I really need to be able to run multiple sites locally so. I hate running sites under Localhost or 127.0.0.1 seems so silly when you can create seperate sites for everything in IIS and know exactly where everything maps....
Let's back up.
Fiddler's a proxy server; it sees all of the traffic that is sent to it. Generally speaking (unless you're using it as a Reverse Proxy) you never want to configure Fiddler to run on port 80; instead leave it up at port 8888 where it runs by default. You instead configure your client to proxy its traffic through Fiddler.
Now, what "reading around on the Internet" did you do that caused you to modify your machine.config or web.config file (you didn't mention which you edited)?
If your goal is to watch traffic with Fiddler, you need to point the ASP.NET proxy settings at Fiddler, not at whatever "PH.api" is (e.g. use "127.0.0.1:8888" and set bypassOnLocal to false). The further complexity arises in that System.NET bypasses the proxy for any request to "localhost" or "127.0.0.1", so if you're using those addresses for your target, you should change them to "localhost.fiddler" temporarily while debugging.

Can connect to my tomcat home page but not to my GWT server homepage

I have what I think is a security setting problem. I have an instance of tomcat running on my Win7 pc listening on 8080 and I can connect fine to it from another pc.
I then have a GWT app running listening on port 8888 but I can't connect to it. Is there a setting on Win7 that I must white list what ports I want to allow remote connections to come in on. I turned my firewall off momentarily but this made no difference.
When Dev Mode starts, by default it does not allow access to your server from a remote IP. To active this, you must specify which address the server should bind to. From https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#What_options_can_be_passed_to_development_mode this is usually done by adding the following to your arguments, sometime before the modules
-bindAddress 0.0.0.0
This will bind the server to all IP addresses available to the JVM.

How to access JBOSS Restful web service using IP and Port

I created a test JBOSS web service and there is only one test method in it. I access this using http://localhost:8070/MyWebService/MyRESTApplication
and it shows the result from the web service. I tried this in both Eclipse and Browser and it works.
But when i want to access this web service using IP address of my system then it shows ERROR message that Page cannot be displayed (in fact browser is not able to find this web service).
I want to access like this http://IPaddress:8070/MyWebService/MyRESTApplication
what should i do so that i can access it using my IP from some computer
You have to start JBoss using :
./run.sh -b [your_IPaddress]
On windows:
start run.bat -b 0.0.0.0
This will tell it to start and bind to all network interfaces. You can also replace 0.0.0.0 with your actual IP if you only want it to bind to that network interface.
I find it easier for debugging to have it come up on all network interfaces because this will work when you are running a virtual machine to debug something like Internet Explorer.
Open your server setting in Eclipse and set Host name as your IP address or 0.0.0.0

Making web application go Public

I have my web Application deployed in jboss web server. It contains Servlets. Right now its url is localhost:8080/MyWebApp I want to make it public so that the clients not in localhost can also access MyWebApp. I am new to this so I am not pretty sure about how to do this. I have browsed through many sites offering a domain but I dont understand where will my Server reside. Can I make my own System as Server and run jboss Server?
Regarding listening only on localhost, take a look at your startup scripts ; to make it listen on all the network interfaces you can use
run.sh -b 0.0.0.0
To listen only on a particular ip use
run.sh -b 1.2.3.4
Ideally you do not want users to access http://some_server:8080/MyWebApp but something like http://some_server/MyWebApp. To do this you will need to setup Apache with mod_jk and proxy the requests to jboss. If you have never done this before, it might be challenging. But there are plenty of resources on the internet to help you perform this task.