I need to state up front that I am not a Java developer. So it is fair to assume that I know very little about the tooling etc. that Java dev's will be naturally familiar with.
So, I have created a Jersey web api (2.25.1) on my home server running Windows 2012. It serves data to a Xamarin application. I need to deploy this to a Linux server (Ubuntu) on AWS which my friend spun up.
At the moment, the only access I have is via SSH (Putty).
Tomcat (and Glassfish) have been installed on the Linux machine.
How do I go about deploying that application to that AWS server?
The official Jersey documentation seems to be MIA, and my Googling efforts don't yield much. There's a lot of SO questions with a similar title to this one. But I have not found any of the answers (and in many cases, questions) helpful to my cause.
Cheers
I assume that you are using maven to create your jersey web app .
Upon build you will get a *.war file .Copy the same to tomcat/webapps folder .
Start your tomcat then.
To take your file there on remote use winscp tool with your ssh credentials.
Related
I don't know if this is the right one to post to, correct me and I will switch!
I am using java with eclipse photon with Apache tomcat 9. I am making a application that will be connected to server (local host or make a local host on the pc) and then I will be able to send things to this local host node to store on a document. I was woundering 2 questions before I embark on this adventure that I haven't found the answer to.
Number 1: I want to use websockets, and I have tried to find an API from tomcat website but can't find it. I have looked at bunches of API's, there is a lot of free ones, but they are confusing me a bit. There is the javaEE websocket, then their is also a tomcat version (although I'm having a problem finding that now lol), but I just want it to use localhost. In all the tutorials I have watched they use javaEE (expected), but now I don't know if tomcat and websockets work in anything other then javaEE.
number 2: My application relies on there being a local host on the machine it is running on. If I configure tomcat, and have my Server file in my project explorer for eclipse and have that inside my project folder that contains the scripts etc, when I finish and compile my application on installation for the user, I am assuming I will have to create a local server on the users machine on installation; but I was woundering(hoping) that is it simpler, and the local server folder (that I saved within the compiled file that the user will download) that contains the local server configuration will be carried over to the users version when they download. I am woundering this because of setting up ports etc.
Any wisdom or tutorials please link!
For number1 you can implement pure websocket for java with helping of this https://www.baeldung.com/java-websockets.
For number2 I suggest you two options:
Use an embedded version of tomcat then you can create a jar file and give it to your users to run it in their localhosts.
Write a ant task that when users run, your project files and resources copy to tomcat.
I created glassfish server in jelastic environment. Now I can import(upload and deploy) my application to it.
The question is: How can I export(download to computer) that deployed application from the server.
The best way for software development, in your case, is using the version control system. Jelastic supports deploy java project via GIT/SVN with Maven. With this solution, you will always have actual source code which can be deployed on Jelastic in any time.
Also, you can download your application using Direct SSH Access to the Container or SFTP/FISH Protocols.
After some time of research I didn't find a complete answer to this. My scenario is as follow:
1 Windows client with Eclipse.
1 Debian server with Tomcat 8.
The idea is to use the remote Tomcat server in the Windows machine to avoiding install the local Tomcat plugin on it, and deploy the projects directly to the remote server vía Eclipse. Is this possible?
As the information I've read, I'm afraid that the local Tomcat server is mandatory in order to get access to de Java Servlets API (package javax.servlet.*). I have a project in Eclipse without any Tomcat (remote nor local) and this package is not available so can't compile.
So, there is a way to achieve what I want? I'm a bit lost in this, so may I have some misleading concepts and simply this is not possible for some good reason :).
Thank you in advance.
I am getting started with AWS plugin for Eclipse (Juno)
I've seen that it is possible to deploy some app on Amazon Elastic BeanStalk, which is great, but I'd prefer to deploy it directly to a specific EC2 instance (mostly for cost optimisation)
Has anyone done that before, or will I have to write my own Eclipse plugin to do so ?
According to :
http://blog.rajithdelantha.com/2011/10/complete-guide-to-deploy-java-web.html , creating an EC2 server (to be used like a Tomcat) is possible, but I can't find the option, I just have Tomcat6/7 for EBS.
With an EC2 server you can run whatever web server you want, it's basically just a VM. You could run Tomcat, Jetty, JBoss, etc. Almost all of those web servers have plugins or tools to enable deployment from Eclipse which are completely independent of Amazon. For example, if you choose to setup Tomcat on your EC2 server then you could follow these (there may be newer) instructions.
This is my first post on stackoverflow, so please excuse me if my question is stupid, in the wrong tags, not specific enough and just tell me how to improve my post ! I usually find all the answers I need going through the previously asked questions - and thank a lot the stack overflow community for this ! -, but not this time !
So, I'm student and I'm currently developping a java2EE web application to help a compagny managing its moulds stocks. I used struts2 framework to develop the application (which is called MMS) and it runs nicely on my personnal environment which is :
OS : windows7, 64 bits, service pack 1
Application Server : Apache Tomcat 7.0.27 to make MMS run on localhost
Database server : Wampserver2.2d to store the database of MMS
Java : Java JRE7 (jre_7u4-windows-x64)
IDE : Eclipse Java EE indigo sr2
Now I need to deploy my application on my employer's server. They gave me an access through the microsoft remote desktop tool to a windows 2003 server whose configurations are :
Microsoft windows server 2003 entreprise edition
Service Pack 2
My question is simple : how do I go from an application running well on my own environment to an application running on their server and accessible to their employees within their intranet ? Surprisingly enough I did not find any tutorial explaining how to do this. The documentation I found so far are the following :
Tomcat documentation : http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html
Microsoft documentation : http://msdn.microsoft.com/en-us/library/aa478983.aspx
Some other documentation explaining some of the logic (could not post the link because I'm a new user !)
My guess is :
First I need to prepare the environment, ie : install java, a servlet application server, and a MySQL server on windows 2003 server. For this I'd be tempted to install java JRE7, tomcat7, and wampserver2.2 on the windows 2003 server they gave me using the same .EXE I used on my PC.
Deploy MMS in the servelet application server : For this I think I could just drop the .WAR of MMS (created with Eclipse) on the webapp folder of tomcat.
Deploy my DB on the MySQL server : For this I'm thinking of exporting my DB from my computer and import it to the server using PHPmyAdmin (and a .SQL file)
Finally change the context.xml of MMS to make it able to communicate with its new DB.
Would this be enough to allow the employees of the societe I'm working for to access the web appication through their web browser (within the intranet of the compagny only) ?
Any anwser telling if I'm going on the write direction, if I forgot anything to do, giving advice, etc. would be truely appreciated :)
Thank you very much in advance !
Here is a generic solution I would suggest. You can simply install the wamp server package and the tomcat for windows. Upload your war file and start up mysql db, apache and tomcat services. Wamp server should come with php, mysql and phpmyadmin for your mysql. If you are good with batch file, you can make a batch file if you want to automate start, stop and restart all services.