This is the first time I set up a home web server and I use Glassfish for this.
I already did port forwarding to the computer in router I use as server.
I changed the port of glassfish( using netbean ) to 80
I changed address in network listener to the current ip address (192.168.1.xxx) that router forwards to
I don't know what I need to do next. what I am trying to do is that when I type router ip address into browser, it will be able to see my welcome page. However, what I've got so far is connection time out error.
My question is how can I config (my machine, glassfish server) to make it possible to access to glassfish server.
Related
I deployed my app on Heroku. It is a simple app that will throw back the message sent from its client version (running on my PC) back to the client. My server app prints the IP address of the machine it's running on so I can connect to it from my client . I do get to see the IP address of Heroku machine when I deploy and run it. However, I am not able to connect to it from my client version using that IP address(Connection timed out) . I have allowed the port I am using in my firewalls. I don't understand what I am doing wrong .
Pls help me solve it.
If you need to see my code let me know ( the app works fine locally on different terminals so I don't think it has a problem).
Your Heroku dyno (an isolated server) is behind a router. You can't use the IP address to connect to it.
Instead, you the URL https://[appname].herokuapp.com where "[appname]" is the name of your app.
You can also run heroku open from the command line.
I tried to run my war application on port 80 instead of 8080. However when I change port number of Glassfish to 80 it cannot start because apache uses that port. My website is working on that port and I want to run my application in a subdomain of my website. What should I do to get rid of 8080 port in URL?
Two applications cannot share a TCP port on different subdomains since the concept of a subdomain/domain is specific to DNS and HTTP, not TCP itself. However, you can either keep both Apache and Glassfish on alternate ports (perhaps listening on 127.0.0.1 only) and use nginx or another reverse proxy. Alternatively, you can keep Apache on port 80 and instruct it to reverse-proxy requests on the subdomain to Glassfish, or the other way around.
You can host your website on Glassfish. It has a built-in http server.
Right click on server.
Click on add server.
Add glassfish server information. Click on choose. Then click on next.
After that, the created server is available under the server tab. Right click on the created server and start the server, then, create new web application.
I developed an application in my home machine. Now I want to show application that i made to client through WAN. I have TP-Link WiFi router at my home. Is it possible using port forwarding or other solution ?
Yes, you can use port forwarding to make your application accessible from the Internet. Essentially, what you want to do is redirect traffic coming into your public IP on port 80 to the internal machine running tomcat on port 8080.
There are public guides available for configuring port forwarding on different routers.
Edit: Port forwarding however might not be the only problem. There are other things to consider:
1. You should use a static external IP and map it to a DNS name, so users will be able to access the site by typing the name in the address bar.
2. You should make sure that the machine running tomcat allows external connections to port 8080, so these aren't blocked by the firewall.
I have a tomcat7.0 running in a remote desktop machine say 204.34.34.45.
When I log into the remote desktop and try "http://localhost:8080" it is working fine.However
http://204.34.34.45:8080 is not working.
I am able to ping 204.34.34.45 from outside the remote desktop machine.
Do you know how can I access tomcat outside the remote desktop machine.
The firewall rules for that host may not allow connections to 8080. Talk to your system administrator for details.
Also, make sure you have the correct IP bindings set up for tomcat. It is possible to allow connections to localhost:8080, but disallow them from 204.34.34.45:8080. See How do you configure tomcat to bind to a single ip address (localhost) instead of all addresses?
I'm developing a WebApp in a company using WebSockets. It's currently in a basic "client sends message, server responds"-state and works just as it's supposed to work... under localhost that is.
I'm using a Tomcat 7 and Netbeans to deploy the app. So basically I reach it under
localhost:8080/WebApp
and the WebSocket itself is referenced as
var ws = new WebSocket("ws://localhost:8080/WebSocketTest/WsSendTest");
If I now change the "localhost" to my Network IP I can still reach the Website, but the functionality seems broken. I have a "ping" button that sends a ping-msg to the server. If I rapidly click on that the functionality seems to be restored. But after F5-ing it's broken again.
It only seem to happen when I change the ws:// path to my IP.
Weird thing is, the onOpen()-method is implemented in a way, that it logs the session-ID of any client connecting to the WebSocket and it recognizes the connection immediately. Just the rest seems to "lag" or "block"?
I will end up having to use the IP since other ppl in the network can't rech the ws:// if it's set on localhost in the webpage.
Can anyone relate?