I am learning to make a web application, and have a Java EE web application that uses Apache tomcat as server and web container. Currently, I am able to run the application and the tomcat server (localhost:8080/chatsystemWar)
I am trying to make the application go online without using web hosting. Could someone please help me understand the following?
1-Is it possible?
2-To my surprise, all computers at my house are able to access the application by replacing the "localhost" part with the computer name. How come?
3-Because of 2, I guess I have a working server and application, so all I should need is to somehow get the Internet to know about the application. Would buying a domain name help? What needs to be done after buying one?
4-Would modifying server.xml help?
Thank you very much. This is my first question on stack overflow, but I have been relying on you guys for at least a year now. You guys are awesome!
Long story short, if you want to expose your web application to the wider internet, it must be hosted on an internet facing web server.
You could host it yourself, on your own machine, and open up port 80 on your router, and ask your ISP for a static IP address (or use a dynamic DNS service like NoIP), but that is not really ideal and exposes your machine to the internet for all and sundry to hack on.
A better choice is to purchase web hosting from a company that specializes in such things. Or you could spin up a web server on Amazon AWS and handle it yourself, but either way, you won't be opening up your home network to the internet.
This is a big topic and you'll have to do some more research to learn about all the different aspects.
Is it possible?
Yes.
To my surprise, all computers at my house are able to access the application by replacing the "localhost" part with the computer name. How come?
Because they are all on the same local network.
Because of 2, I guess I have a working server and application, so all I should need is to somehow get the Internet to know about the application. Would buying a domain name help? What needs to be done after buying one?
Yes, a domain name would help, but is not needed. What you need is a static IP address (uncommon for homes, usually cost extra) and to configure your router/firewall to allow the traffic to flow.
Way too broad a topic to cover here.
Would modifying server.xml help?
No.
Related
I have a GAE project and I would like to make requests to an external server. The server needs to whitelist the IP address but GAE works with dynamic IP addresses and the list is too long. I have been looking at 2 options:
1. Move the GAE project to Compute Engine
My biggest concern about this is the time it would take to move the project to Compute Engine. So far we've been using App Engine for free and we would like to avoid extra costs.
2. Use our domain to make the requests
We could white list the IPs ourselves and receive requests from the GAE project to our domain and then make requests from the domain's static host IP itself to their server.
For this option I'd also like to know if transferring the domain to GAE has any advantage. Will the outgoing requests from GAE through the transferred domain be made through the domain's IP?
Note:
This is largely based on assumption, I am highly inexperienced with networking so if there's anything that could be better expressed please tell me. I tried to search online for a way to do this but couldn't get to a satisfactory answer.
You don't need to think about domains in this context, because you're whitelisting IPs, not domains. And it's not necessary to move the whole project, you need only move that part that makes this requests.
Just create a proxy on any server with a static IP, like micro instance on Google Compute, and do all requests through this server.
As I understand you do all request to the same external server, right? In this case it could be even simpler. You don't need to install a full featured proxy, just install an Nginx on a micro instance (with SSL and some authentication, of course) that will proxy all requests to the target server.
I ended up using RabbitMQ to send messages from Google App Engine to Compute Engine, the compute engine then forward those messages as Http requests.
I am really new to web apps and web services... But i have created a webservice and it's working in localhost(apache glassfish) but i need to deploy this thing in an external se(in java)rver so that every one can consume that web service via my app..Unfortunately am unaware of this technique.
so can anybody help in this problem ? Can i host this webprogram in normal godaddy webserver or is there any other way for this..in fact, my app is a small one and i need the solution for small apps or startups
thank you
GlassFish hosting will be hard to find. If your application is not GlassFish specific and can be run on JBoss, then you might try RedHat OpenShift. They have free plan for small application load and you get for free server administration, database administration, deployment is easy, you might concentrate on coding only.
Another option is to use Heroku. You will also need to neglect GlassFish, but they have easy path to creation of REST web service backend.
I recommend renting a server at amazon:
http://aws.amazon.com/ec2/pricing/
You can take already existing images with GlassFish and a Database or take a naked CentOs/ Red Hat Image and install your GlassFish manually. The link provides a table with all prices. A m3.medium costs $0.070 per Hour. It's super fast and flexible and you have high availability.
In NetBeans you can deploy on a remote server via: Services -> Servers -> Add Server:
Just enter your ip, username and password for the GlassFish Server:
Or
You can host your Project on a Raspberry Pi. Maybe the power is enough for a small Web App:
http://www.thehecklers.org/2013/10/27/glassfish4-raspberrypi/
Advantage: It's cheap and you can learn and control a lot.
Over the past two weeks i have been developing a jersey RESTful webservice and a MySql database that it communicates with. Now my Android application is done which gets it's resources from the webservice. During the whole development time i've had the webservice on a tomcat server on localhost. But now I need my service to go live.
And I dont even know where to start. How can I make it go live? What hosting companies are there that supports these demands and where do I start? How does the webservice -> database connection looks like on the hosting part? Is tomcat commonly used to host?
As you can see I got close to no knowledge about this and a wink in the right direction would be great!
What you need is a hosting service that supports Tomcat and MySql.
This what i found googling "tomcat hosting service", but there are a lot more.
You also might want a domain name (like www.mydomain.com). some hosting servies provide that as well.
I suggest you call them and ask them if they provide support for what you need.
Calling a remote service should be the same, all you have to do is change the url host, so instead of:
http://localhost
You'll put your domain:
http://mydomain.com
I am beginner java web developer, now my question is after i developed my application, how to make users see it on the web?
I used JSF,MySQL and GlassFish server in my development stage and now i want to publish it.
I got a domain name and an a web hosting account on goDaddy.com
In other words what to do after i develope my web application?
what steps should i take in server creation and other stuff?
I have searched alot but there is no specific way for it. I am trying to make this dynamic website based on jsf development--and it is already done--become alive and out their like any other web site?
any guide lines and steps should i take in making this steps ?
Either you will need a "Production" server to host the application yourself or use a hosting service of some kind that provides a Java EE container. If you're tied to Glassfish, you can Google for those providers like http://glassfishhosting.com/.
Other options that might be good fits for you are cloud services. Something like either Rackspace or Amazon EC2. Each has their own pricing tiers that scale based on usage. Good luck to you going Live!
Can host the code on Github and push it to Heroku.
http://devcenter.heroku.com/categories/java
I don't know the provider you chose but you need a java application server for your live environment. And optimally this should be the same server as your development server.
For our projects we buy a virtual server and install Glassfish on it. This costs around 15 € per month and we have the same environment for development and production.
I want to exchange E-Mails from a locally installed Microsoft Outlook through a Java Application which is running on a Tomcat Server.
In the past this was no Problem but since we switched the tomcat server from a "normal" starting routine to be started as a service (which is done for performance reasons) my Connection to Outlook is not working anymore.
As I was searching for a Solution to this quite for a long time (with no found solution) I decided to leave a post here.
I already know, that
The Outlook Object Model is unsuitable to run in a Windows service
which can be found at http://support.microsoft.com/kb/237913. Due to the registry hive HKEY_CURRENT_USER which is not loaded when a service is started.
But in this case I think a simple 'No - that’s not possible' can’t be a solution and that’s why I am asking here for help.
Is it for example possible to let the application on the tomcat start a new local application which then connects to Outlook?
Is it possible to manually load the HKEY_CURRENT_USER hive?
or on the other hand do this by using a solution which I did not mention yet?
Thanks a lot in advance!
You probably need to create a plugin to outlook which submits the email to your application using web-services (or similar).
I believe this is the usual way of realising requirements like this.