can i update my working war file in google application engine - google-app-engine

I have developed an project in java and exported as war file it runs in tomcat . can i use this application in google application engine.
1) Will my war file works in google app engine.
2) Do i need to change any thing to make it work??

Unless we are talking about a "Hello World" type of application, you will most likely have to change some things to make it work.
In particular your interactions with a database will need to be re-thought to work with the app engine data store. Same goes for file system access (not possible on app engine) and a couple of sandboxed libraries.

Related

Deploy non-web Java application

I have a relatively small Java app, which I'd like to move over to the Google App Engine. It runs in the console, with no user input needed after the initial startup. I researched a bit on how to deploy it, but all tutorials seem to focus on Java web apps, when I don't really need that. Is it possible to deploy my app if it's not a web app?
App Engine is probably the wrong GCP platform for you - you'd probably be better served just deploying your jar directly onto a Google Compute Engine node. GAE is pretty explicitly oriented around web applications and you'd need to do a bunch of configuration in order to have it work for your use case.
Does your non-web Java app handle web requests? If not, it seems difficult to imagine that you would be able to reach your deployed app and use it for any purpose, once deployed. Your Java app should be able to handle requests, to make deployment worthwhile, and the deployed app useful.
You may find out about how your app should handle requests by reading the How Requests are Handled documentation page.

Deploy small change to google app engine

I want to deploy a change in my app.yaml file to google app engine. Is there a simple way to do this without redeploying the whole app? Is there a way of changing the app.yaml file on the google cloud directly? Or just deploying one file from my Windows directory?
My app is working fine in the virtual environment but I'm having some issues on the google cloud platform. The whole deploying process takes quite a while so I'm looking for a faster way to make a change and test it.
You can use appcfg.py update app.yaml from AppEngine Python SDK:
https://cloud.google.com/appengine/docs/standard/python/tools/appcfg-arguments#update
Use the files argument to upload one or more YAML files that define
modules. No other types of YAML files can appear in the command line.
Only the specified modules will be updated.
You can try using gcloud app deploy inside the directory where your application is located in order to upload the file you need.
Specifying no files with the command deploys only the app.yaml file of a given service.
This command will only upload to the cloud the files where there are changes, so if you have only modified the app.yaml file, it should not take too much time for the upload. However, as that is the configuration file of your application, it might need to be re-deployed completely, as the changes made in that file might affect the behaviour of the whole app. That is the reason why it might be taking longer than expected.
On the other side, you may want to know that if you are using App Engine Flexible environment, the deployment will always be slower than in a Standard environment, as resources have to be deployed before launching the application itself.

Google App Engine swf files paritally downloading

I'm just getting started with Google App Engine and I have a few questions. Some of my swf files are halting their download after loading the first 10%. This doesn't happen on a traditional web host, or when running the GAE app locally. I'd like to verify that the file has uploaded properly, but I can't figure out how to view the files associated with an app once they've been uploaded to Google App Engine.
Thanks
There is no way to view files on the server. But you could download app files from the server: https://cloud.google.com/appengine/docs/java/tools/uploadinganapp#Downloading_an_Application
Also I suggest to use Google Cloud Storage for such files, there you can upload/download/verify/etc from the browser (or command line), and it better suits for serving static files, especially large ones

Static files in GAE Cloud

When an application is deployed in GAE cloud (Appspot.com); Is there a way to update or modify the static files on the src/main/webapps folder? For example the HTML and JSP files?
Either upload a modified HTML and JSP without redeploying the whole application?
Much like what we can do with Apache Tomcat, where we can modify the contents of the deployed app?
As far as I know, there is no other way short of redeploying the entire app. App Engine runs in a sandbox, and write file access is one of the things disallowed by the security manager.
Unfortunately, "Writing to local files is not supported in App Engine" http://goo.gl/kxNM5

Google Web Toolkit throws java.security.AccessControlException

I'm trying to read a sqlite db from the server side code in my gwt project. It throws AccessControlException. I looked a lot on the web and all solutions seems to be disabling Google App Engine, but when I do this, I can't run my project. I'm new to GWT and I have no idea where it runs when Google App Engine is shut down. I look for possibly this two solutions: Any setting that Google App Engine is set to be able to read any file, or other engine that I run my application on. Thanks
The problem is that Google App Engine (GAE) does not support sqlite (I assume you are reading it using JDBC).
If your intention is to make a GWT project that will not be deployed on GAE, you should create the project disabling this feature from the very beginning, because afterwards its a nightmare as you are experiencing right now.
If your intention is to deploy in GAE, you must use the google's persistence mechanisms (JDO) to store your data. SqlLite is off the table here.

Resources