Deploy Java restful web service to live server - java

I have just learned to create java rest API using jersey and Oracle database.
I'm developing in eclipse and using weblogic server to run and test web service on localhost.
My question is what are the options of live servers to deploy this service so that I can access this API in my android application or any web application???

You can do that. But you have to make sure that all the dependent jars are packaged with the your WAR project(eg; Oracle db related things).
Some blog entries which give you an idea about what are all these servers and which one to pick for open development and common standards - http://blogs.forrester.com/mike_gualtieri/11-07-15-stop_wasting_money_on_weblogic_websphere_and_jboss_application_servers,
and this one http://zeroturnaround.com/rebellabs/the-great-java-application-server-debate-with-tomcat-jboss-glassfish-jetty-and-liberty-profile/
This will give pretty good idea about what is all these servers :)

Related

Developing app with web and Android client with Java

I'm going to start developing a new simple "X management" kind app, like contact management or events management. What I want to know is which tools would be the best to achieve it in the way I want.
My app needs to be a web app running on a server that has a mysql database to save and retrieve some simple information. This app must have a web client but I want it to be able to be extended to work with an Android app client.
Things I've thought:
I've worked on Java with facelets and JPA travels management app running on a GlassFish server on localhost with a JSF web view, so maybe my web client and the full app could be done with this.
I've worked with web services such as SOAP and REST with Jaxb and xml schemes to retrieve information parsing some webs into xml or json to show on a client .net app. So I've thought I can add to my app, like last topic we talked about, a REST web service layer to easily work as I want, or at least I think it would be easy. If I do this the Android app could share the same app core code but using the REST service.
My question is what could be the best way to do an app with 2 client side in different platforms that could share some code to be easy to extend it moreover to a desktop app. I've talked about these 2 options because I'm a students of computers at university and those are the tools I know, but I can easy learn more. I've also think about just a REST service and create a web and an Android client to work on same service or something like that.
This post is getting long, so here is the summary: What technologies and tools do you think are the best choice to create an java web app that needs to have web and Android client? Also what server, like tomcat, GlassFish or another, should I use? And what about persistence layer? JPA with mysql is the best I know to work with.
Thanks a lot.
P.D: I work with eclipse
From my point of view:
You can use java jersey and java spring both ( java spring as Dependency injection) for creating RESTful Web service. So, In server side you will create endpoint and you can access data from any platform through those endpoint.
Server can be anyone. It's up to you. I always try to use tomcat but tomcat is not a full JavaEE container it's only a servlet container. So if you want to use full JavaEE version then you should use Glassfish.
And yes JPA .It can be easily used in any environment supporting JPA including Java SE applications, Java EE application servers, Enterprise OSGi containers etc.
On the other hand, still choice is yours.

Creating Java Restful webservice on Windows Azure

we are working on our graduation project project that has two main block
1- A website that is written in ASP.NET
2- A webservice that access the database (mySQL DB) , do some processing on data and communicate with that website to show the results.
We are using a java library [Apache Mahout] in that webservice to help us do that processing and that's why we need to write this webservice in JAVA
How can we create and host a Restful java webservice on Windows Azure ? What are the available options ?
Also , Is it possible to start the processing and stop it depending on a request that is sent from the website or another block (another webservice for example) ?
I hope the situation is now clear.I would appreciate if you could provide us with any resources that could help us understand how Restful java Webservice in Azure works :)
Today you have two options for running Java on Windows Azure: Cloud Services and Virtual Machines. Cloud Services (Platform as a Service) enable you to package up a web deployment (WAR) along with a JDK and your java server of choice (Jetty, tomcat, Jboss, etc) and deploy it. Your other option is to use a virtual machine (Infrastructure as a Service). You have a few different options for virtual machines (including officially supported Oracle images: http://www.windowsazure.com/en-us/campaigns/oracle/).
Your easiest option will be looking at Cloud Services (though this does require packaging no a Windows computer). There is a great Windows Azure plugin for Eclipse that will help you out tremendously (http://msdn.microsoft.com/en-us/library/windowsazure/hh694271.aspx). There are also a lot of tutorials, resources, and links to references here: http://www.windowsazure.com/en-us/develop/java/.
Azure websites now supports Java web applications - check it out - http://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/ - you use the default JDK 7 with Tomcat 7.0.50 or Jetty 9.1.0 OR you can even upload your own web container and configure it as per your requirements. Please refer to the link above.
I have created a Java web service using Axis2 Framework/Eclipse and deployed it on Azure Websites.

linking my java web application to the web?

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.

How would I/can I post a java web project from Netbeans to Sharepoint?

I have a java web application that I am developing in Netbeans (and running through Tomcat). Is there any way to put this application on Sharepoint?
This is my first time doing this. I've read that to post the application to a tomcat server you just have to copy the .war file over, but I haven't been able to find an easy solution for Sharepoint.
Sharepoint isn't a Java Application Server. You'll have to use Tomcat (or another Java Application Server) to host your application. If you need to interact with Sharepoint from your application, you'll have to use web services, a shared database or something else to communicate.
That's not possible out of the box. SharePoint only runs ASP.NET applications, not java projects.
You can deploy the solution to a Tomcat server and then use the Page Viewer Web Part to show external content.

Server to run java servlet

I'am developing a java servlet application, and tesing it on Eclipse + Apache Tomcat (refer: http://www.vogella.de/articles/EclipseWTP/article.html#overview_wtp).
The application is now tested on the localhost and accesed by any clients on the same LAN.
Now, I need to deploy it into the web server, where everyone from anywhere can access this servlet.
Coud you guide me the way that I've to do to archive this task.
You need to have a computer accessible to everyone - i.e. placed on the internet and not behind a firewall - with the appropriate software installed (and hardened against hacker attacks).
If you do not have such a computer, you can have a look at the Google Application Engine which allows you to deploy Java web applications (with some additional restrictions) to the Google cloud. This is free for low-volume applications.
Yes, you can do it by deploying your application in the Cloud Instance. Since we cannot able to make our server instance or computer to be run always(We may come across internet connection problems, Power Fluctuation, etc.,), We have lot of problems while making our instance public(In Security perspective too). So it is better to use cloud instances.
We have many Cloud Service Providers such as AWS by Amazon, Google Cloud, Microsoft Cloud, etc.,
Take a look on this List of Cloud Services Providers.(You have links for all top 10 providers)

Categories

Resources