I have a project made with Eclipse or Netbeans, it's a Java web application, I would like to deploy this application on web, using a free server, It's only a trial for to learn how function, Could you explain how I can do it ?
You need an application server that supports Java. Tomcat, JBoss, Jetty, any one who fits your needs. Then, just upload your war file into webapps folder (for Tomcat) and it will do the work for you.
You can check here some free or trial services that should be enough for learning.
Then, when you kickass deploying web apps, just subscribe some java application server service or, as I do, rent a VPS and install all you need. Give you some more work, but much more flexible. I've been using ovh VPS and for the price, I'm very happy. Good luck ;)
Related
I'm trying to build my own site where initially I will only host my profile and resume but will also build and publish some simple web applications that I can use as coding samples for jobs. The idea is people can see a demo of the apps and then see the code on github.
Can I do all this using only tomcat or should I use another server for this purpose?
I have heard that tomcat should only be used for java web applications but I've tried it locally and it seems to work...
You can totally do it all with tomcat.
Arguably, tomcat is not as efficient as apache or ngnix for serving static assets, 10% less so, and does not scale as well. There's a good article on the subject here:
http://tomcat.apache.org/tomcat-3.2-doc/tomcat-apache-howto.html
This is not not going to be an issue for you with a small site. Go with what gets you up and running the fastest.
If you want, later you can show off your technical prowess by running tomcat behind a web server. You can tell folks at interviews the story.
looking into hosting sites (for a play framework application) i have noticed 2 options VPS & Dedicated JVM Java Hosting. will i be able to achieve same result using both options eventually or is one more limited ?
Borderline question. In fact, both strategies have advantages and inconvegnients. But for Playframework, you must be thinking about :
Playapps
Heroku
Jelastic
for the JVM Hosting. Just take into account the fact, Play is supposed to be served through it's embedded Jetty for better performance. When deploying to Jelastic, it will be deployed as a WAR. Performance issues might appear when using WARs instead of the out-of-the-box solution.
On the other side, a VPS must be configured can have security issues and all that. As I said, both have good and bad.
There are a couple of things that should be cleared.
Play framework comes with netty web server (not jetty, which is the server used by heroku), and play developers advice users to deploy on that server for production, mainly in order not to waste resources (a servlet container comes with lots of stuff that is not needed) and to deploy on the same platform that you are developing.
There are no performance issues deploying your application as a war exploded folder on any servlet container, it's just that you might be wasting resources.
The only disadvantage is that you won't be able to take profit of asynchronous requests.
Now there are lots of options to deploy a play application: openshift, heroku, gae, cloudbees, jelastic, dotCloud, playapps... in fact any servlet container will do.
have a look at this question: Experiences on free and low-cost hosting for play framework applications?.
if you are looking for an unexpensive option, I would go with openshift.
Apart from that is like Zenklys said, on a VPS you are your own IT department...
I use Eclipse "Dynamic Web Project" to create and test web application. It will publish my application on application server in convenient way. I don't need to write script, just wizard.
However, I am wondering it is a decent way to deploy a web application. What's your opinion? Thanks!
(I used to use Ant script to deploy my application, it's standard way.)
plus: Dynamic Web Project uses its specific directory layout which is different with Maven standard directory layout.
This is fine for deploying to a dev or test server. Its a convenient way to quickly deploy to have a look at changes you've made and to do tests.
I would definitely not allow this for any other environment, eg live, pre-production etc. You should have an established process (eg documented change control) to deploy to these environments.
I have heard it's still recommended to cold deploy and restart the server for not having a trouble with memory leaks, dynamic class loaders. For myself I think comfortable to deploy from Eclipse to most environments. Basically Eclipse WTP server adapter can run the same deploy command as the other processes. When I use clouds like GAE or Beanstalk I do deploy from Eclipse plugin, it is the same like command line.
This might be a newbie question. But I am working with iPhone programming and I have hosted my own webservices written in Java on a ubuntu linux and Eclipse EE edition with a glashfish server. Is there any easy way to export this webservice and getting it hosted elsewhere.
I have been looking around for a solution but have not found the grail yet.
All help is appreciated
I don't know what you have in mind when you think "export", but you're deploying a WAR file locally on Glassfish. That's the package you need to pick up and move to your hosting service. They, in turn, have to accept WAR files and deploy on a Java EE app server.
Your WAR file should be portable if it has everything your app needs. Make clear what you need from the server (e.g. dependent JARs); everything else should be in your WAR.
If you can adapt your solution to the limitations of the Google Application Engine, they will host it for free.
This strongly depends on how many Java EE features you use.
there any easy way to export this webservice and getting it hosted elsewhere.
You just need to take war file and deploy it somewhere else you want
I'm a newbie when it comes to Java for web application stuff, so forgive me if I'm missing something obvious.
I'm building an app that uses the Twitter Streaming API and Jtwitter to listen for various tweets, do some database record-keeping, and send out some tweeted replies. The application has no web component, although there will be a web application (probably .net, maybe grails) for interacting with the recorded data.
Right now my application is in development and runs on Glassfish included Eclipse, but when I deploy it I'm not sure how to approach it. I was thinking of using Tomcat to auto-load the application as a servlet, but since there's really no web component to this end of it I'm not sure this is the best approach.
Any suggestions?
As long as the volume is fairly low, the difference between Tomcat and a Java SE command-line app is basically the Servlet API. If something more advanced than a simple start/stop button is required on the administrative side I'd go for Tomcat with a bundled admin console.