How do I run GWT on a linux server - gwt

Sorry for this simple question but I seem not to find any other way than to publish a GWT app to Google App Spot. I'm sure there must be a way to do this.
I've got the development environment working on my local machine but I'd like to publish the solution to my ubuntu server running nginx.
Edit: Just thought of something... maybe I can just deploy the js-code to the ubuntu server? As simple as that? ;)

No you cant just deploy the js-code and html files to an ubuntu server and put it for apache to serve, well... unless your code only outputs hello world that is. Probably your GWT app is calling/using some other Java code that needs to be deployed in tomcat or jboss, is it? If that is the case, ie your GWT is in a war, then yes, just deploy that .war file to any container on any linux box.
Try to copy your .war into a jboss deploy dir.
Deploying to app spot is similar, ie uploading your .war to google. Read more here http://code.google.com/webtoolkit/doc/1.6/DevGuideDeploying.html

Two options:
Run it in Eclipse
Run it with Ant

Related

Glassfish undeployment does not work on Windows but works fine on Linux

I am currently working on a web based application using Glassfish. Therefore I have to implement functionality, compile/package it (using maven), deploy the .war file on a glassfish server, test it and undeploy it again to start a new cycle.
My problem is, that Glassfish won't undeploy my .war file under Windows 7. Undeployment takes about 3 minutes and does not remove all deployed files in /glassfish/domains/myDomain/applications. It generates a .glassfishStaleFiles.
To deploy again, I first have to delete the content of /glassfish/domains/myDomain/applications entirely.
Obviously this takes too long and I need to do this many times a day while implementing.
BUT: It all works fine when using Ubuntu. Clean and fast undeployment and deployment.
Thanks in advance
This is a known issue with GlassFish, due to the way file handles are dealt with in Windows compared to Linux. If some process has a file open in Windows, then that will prevent deployment. There are lots of these edge cases in GlassFish many of which (perhaps all) have been fixed in Payara Server, which is derived from GlassFish. Payara Server is free, so I would recommend trying the latest version 4.1.2.174 to see if the issue is resolved there.
Here is an example of some of the fixes for these kinds of issues in Payara Server:
https://github.com/payara/Payara/pull/467

How to deploy angular2 on tomcat?

First I'd like to describe my set up:
I have a web service, let's call it "Cars", written in Java, that I've tested in eclipse with tomcat v6, working local (it was a requirement, so that once it works locally I can switch to do it with a "real" tomcat server so others can access). It works, it access the database, it offers an answer for certain URIs and so on.
I have coded in Plunker an angular 2 application, "WebCar", and I now want to run that on my computer, with a Tomcat server (unless there is a better way of doing it, I've been told to do it with Tomcat. Since I do not know any better option, that's why I talk about tomcat all of the time). With eclipse, I have already managed to get the app running, using palantir plugin for typescript https://marketplace.eclipse.org/content/typescript , and then running the project with a server-launch.js which contains require('lite-server'); , this allows me to see the same I saw on plunker, so, it works, but before I upload anything to the business servers I wanted to check everything works (hence the set up, which may not be necessary but it's what I come up with).
I now want to go one step further and use, if possible, tomcat v6 to run my angular 2 app, instead of simply using that lite server, so that I can test that it works, and then uploading it to a "real", remote server.
I would like to know what options are there, what would be a better option, and anything that is required to make an angular 2 deployment properly. So far I've found this
https://stackoverflow.com/a/34408495/6028947 " You only have to deploy
.js files, since anyway browser won;t" which I don't fully get,
http://jspm.io/ which is for SystemJS (I have an older version of
Angular 2 and use config.js)
https://stackoverflow.com/a/37568235/6028947 which talks about
angular-cli or webpack, which makes a bundle but if I got that
running, I still don't know what to do with it to upload to Tomcat
and then connect it to my web service.
So maybe the question should be (I don't know for sure): Once you get your angular 2 code bundled, what's next?
Btw there are a few other questions on stackOverflow, similar to this, but as far as I've seen, without any answer at all or with answers only obliquely related to this (and of course, nothing resembling a guide or step by step required)
Thanks to #nuzz for this ..
I'm running a little script to build the project and then copy it to tomcat. I'm telling angular what the base directory is that it will run under in tomcat.
#!/bin/sh
ng build --base-href /angular/ --prod
mkdir -p /home/xxx/apache-tomcat-8.0.37/webapps/angular
cp -R /home/xxx/angular-clitest/dist/* /home/xxx/apache-tomcat-8.0.37/webapps/angular/
Once thats run, start tomcat and you can access it at: http://localhost:8080/angular

Cannot deploy my updates to cloudfoundry

I have a simple app running on tomcat (using Postgresql). I deployed it to the Cloud-Foundry using the STS plugin and it runs OK. Recently I've encountered serious compilation problems (related to JS and JQuery) which led me to re install my STS. Now, when I run the app locally it runs perfect but when I use "Update & Restart" nothing happens - my new updates are not deployed! (I'm connected and Start/Stop works). I don't have a clue for how to tackle this. Please help.
Since you have reinstalled your STS, I would suggest you delete your app from Cloud Foundry and deploy your project from STS again. It might be because your project is not being linked with the app you have on cloudfoundry.com
Try that and let us know how it goes.

Remotely deploying in Tomcat 7 using HTTP PUT

I want to remotely deploy my web app in Tomcat 7. I have added manager-gui, manager-text roles and added a user in conf/tomcat-users.xml. I checked this link out.
Deploy A New Application Remotely
Here they have mentioned that we must upload the war file as HTTP PUT request. How do I achieve this ? I know there are ways to remotely deploy using ANT and Maven. But they look slightly complex to me. Using <form> with method="put" did not work.
The HTML FORM will only support GET and POST. If you want to do this via a Web Interface I think JQuery is the simplest route. Taking the time to build it into your build and deploy process is probably the best solution though.

How to optimize the deployment in websphere 6.1

We are using Websphere's wsadmin to deploy our application which is packaged as a .ear file, which takes more than an hour to deploy and start the server. Is there any suggested optimized tool to perform the deployment. which will help us in reduce the deployment timing.
Thanks in Advance!
Jay
It depends on your application and framework used. If every time during deployment you do ejb compile, it would be not too much options, and all time cost.
Consider the following:
use Rational RAD or RSA with build-in
optimized WebSphere Server.
use optimized settings for
developement in WebSphere admin console
enable auto-reload and use exploded
archive and directly copying files to
it
use external class-reloading tools
like JRebel
Are you stating that it takes 1 hour to deploy a single EAR file?
Where is the EAR file located? How big is the EAR file?
Where is wsadmin running from? (the same machine as the WAS Server or from a remote machine)?
If it is running from a remote machine, does it take long to transfer the EAR file to the actual WAS box?
Also why should the WAS Server be started for deploying your application?
I am assuming you are using a DM set up and the wsadmin is connecting to the DM?
Appreciate if you could clarify before people could assist you.
Manglu