Showing friend my jsp project - eclipse

I am using eclipse with tomcat to develop my jsp projects. Is it possible for me to be able to show this to my friend remotely? Without them having tomcat or anything. Without purchasing a web hosting service?

You can do that using Port Forwarding Login to your router and configure a rule for port 8080 (tomcat port).
Go here to find out your external IP. Your friend should be able to access your tomcat context by using your external IP on port 8080.
Also - make sure your firewall/Anti Virus in allowing this connection.
Hope that helps!
Good Luck!

TeamViewer would be my choice, they can remote into your machine and it will be like they are sitting there with you. If things go nasty, just turn off your network.

Related

How to prevent HTTP localhost preview problem?

I'm running a static web application in Eclipse + Tomcat and every time I run the application (Eclipse) and launched the project, I always encountered this problem 'Launching HTTP Preview at localhost' has encountered a problem:
I have changed the port number numerous time. I am afraid that this action might harm the server itself. Can anyone tell me what's going on and how do I prevent this from keep happening?
It looks like 8080 port is already being used by some other process/application
You can change the port using below steps (In Eclipse)
In Servers Tab, Double click the Tomcat server to open the
overview info
Under Ports section, HTTP/1.1 you can change the port you want and save it
Start the tomcat server, it should work
Thank you

Cloud IDE with exposed ports

Im looking for a cloud IDE like cloud9 which I was pretty satisfied with until I ran into this problem. Cloud9 allows for http and tcp via ws (I think) but I need a workspace with ports exposed for UDP and I cant seem to find one.
Im a newbie in the matter so there could be a way to communicate with cloud9 workspace via udp but there is no info about it in google so idk.
I'm an employee at Cloud9. Cloud9 doesn't allow connecting via UDP as most users don't need it and it would take a lot of engineering effort to support. I'd recommend buying a VPS from a cloud provider and creating a SSH workspace in Cloud9. Then you can use any ports you like and still use Cloud9.

Change port server in eclipse

I have done a restful web service in eclipse. I have configured a server inside eclipse to test it and it works fine but i want to know if its possible to change the default port . Change the 8080 port to another. is dat possible ?
Go to the server view, select the server and change the properties. You can right-click (windows) to get there.
Each server has its own settings plugin, so you may have to search a bit.
Just double click the server you have added in eclipse, and look for Ports will be available right in that view.

How I can deploy my GWT application on www

I created my first Java EE application (GWT + Hibernate). I want deploy my application on a Tomcat web server.
Could you give me a step by step tutorial?
You can start with Google App Engine + GWT tutorial if you are trying out deploying into Google Cloud - https://developers.google.com/web-toolkit/doc/latest/tutorial/appengine
This question is massive so I will try to bring it down to some steps that need some research to implement.
1st. You created an application using GWT and Hibernate. That means that you need some kind of a web server that understands java and can re-write the logic from java to javascript (for the clientside), and also connect to the database on the serverside and retrieve the data for the client.
This web server is tomcat so what you need is:
A computer that will work as a server. This could be your own machine or some server you can buy as a hosting solution. Buying something like this requires research and effort on your part and cannot be explained here.
A version of Tomcat or Resin or any other web server that understands java
A domain name. These can be bought from sites like this one, but there are some free ones around the web. They require static ips that is you cannot use them from a home line that changes ips. Even without a domain name you can host your site on the server but you need to access it by writing the machine's ip instead. - optional - A temporary solution would be to use some kind of dynamic dns service on your router.
After having set up tomcat (you might want to give port 80 to tomcat) and the server you can host your application by uploading the war file. You can make a war file from gwt by following the instructions here
To upload the war file you can use the tomcat manager interface, or you can connect to the server and place it manually in the folder used for the web applications.
I know that each step propably needs as much if not more explanation by I hope I cleared the area a little bit here.

iphone app private test network

I am developing an iPhone app that relies on a custom web service I created using Ruby on Rails. I want to setup a test server on my Mac without having to change the URLs that my app is pointing to - served by the RoR service. This way I can test new features or fixed bugs more easily using the test RoR server.
I have enabled internet sharing on my Mac so I can connect with my iphone to a private wifi network. I installed dnsmasq and edited my /etc/hosts file to resolve my web service URLs to the local gateway ip. However when I use my iphone app the URLs are resolved to the production server instead of my test server (my Mac).
How do I setup dnsmasq to point to the local ip.
Thanks!
Have you set the DNS server address on the iPhone to the IP address of your Mac?
After playing with it some more I was able to get it to work. I needed to edit /opt/local/etc/dnsmasq.conf and change the 'address' tag. I also had to change my Mac ethernet settings, under advance->dns I had to add 127.0.0.1 as the first dns server. This will automatically change resolv.conf which is not meant to be edited manually on a Mac.
After reading up a bit on the Dnsmasq solution, I found a nice step-by-step guide for Mac: http://davesouth.org/stories/how-to-set-up-dnsmasq-on-snow-leopard-for-local-wildcard-domains
(although personally I use Fiddler in a Windows VM for all of this sort of thing - ask if you'd like some details on that..)