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.
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 am a 2 months olds developer in Java Web development (New Job). I want to check for a way to setup local development with IDE & able to debug/work with remote web server.
The current practise in my company is access the web server with sftp (WinSCP), edit file with any text editor, and upload back to linux web server, then either compile the java file & restart in webserver or refresh the content after uploaded the jsp file.
The company is currently using SVN for version control, the web server can be Oracle iPlanet Web server or Apache Tomcat server.
I had go through Eclipse Remote Debugging but I cannot tell which project should I create at the beginning.
I tried to start with normal Java project, but unable to connect with the server.
Do forgive me if I asked this question in wrong section/wrong forum or maybe this seem pretty basic for you, and do point out which action I did wrongly and I supposed to find out more info/knowledge before proceed. Please do not use Intellij IDEA IDE (PAID IDE) as reference, due to currently is just my own idea to suggest a change from current development process in company, with no financial back up.
For database, I am totally satisfy with using Oracle SQL Developer to connect and develop.
Thanks for reading this.
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.
I am developing web JSP application which is now working on my localhost using MySQL database (XAMPP). And it runs good on my PC. My IDE is Netbeans and i am using Glassfish 4.1. which is included into my IDE. To get my application working on Internet i need 2 things:
online MySQL database
online Glassfish server
Did anyone had anything similar to my problem? So far for server i have found Jelastic and for online free database db4free. So i need to get my app working just for few days for presentation so websites with 30 days trial are good option too. This database which i have found is very slow (phpmyadmin is loading several minutes etc.) and my application which is working localhost without any error is not working after deploying it on Jelastic.
EDIT
I have successfully set up my app working with 2 new problems.
Google Charts are working localhost but not on Jelastic
Connection to websocket
So i have in my JSP file included
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
but it looks like same code on localhost working and on Jelastic not. Maybe i need to do it somehow else?
I use websocket where admin see when other users do some actions (like log file in real time) and that also working localhost but on jelastic not. On localhost i used path ws://localhost:8080/KukecDR/endpointserver and now on jelastic i am using path ws://kukecdr.jelastic.elastx.net:8080/KukecDR/endpointserver
I did checked how to set up WebSocket in Jelastic here but i dont have that gfcluster-config in my glassfish admin console. I got default-config and server-config but no that gfcluster-config. I am using Glassfish 4.1. So basically i did succeed to move my project from localhost to "live version" but with few problems.
EDIT2
Google charts solved (had some package which was handled localhost with no errors but on jelastic had error and couldn't fetch data).
Any suggestions/ideas?
Thanks in advance
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.