I see that it uses HTML, CSS, and JS, but does that package with the app or does it need a server if it is a static page?
Also if a server is needed could i get away with hosting on Github pages.
Your HTML, CSS, and JS files are bundled with the app bundle and loaded from local storage. This means that your content comes from file:// (unless you have certain plugins installed that create an http server on localhost).
You'll only need a server if you need one as a backend (which you'd communicate with via XHR/Ajax).
Related
How can i run the index file? How can I serve it on github.
app:build Opening index.html over file:// won't work
You can host your app on firebase hosting.
Go to https://console.firebase.google.com , and create a project.
Download the firebase-tools and deploy your built files there.
Additionally, you can also use the cloud messaging from firestore in your app.
For localhost, you can use "serve" module.
I have a WebCenter Sites installation. Separately, I have site.js and site.css files. How can I make a WebCenter Sites template use these two files? Where do i put those files so they can be consumed?
What I've done so far is set up a simple HTTP server outside of WebCenter Sites and used <link> and <script> tags to point to those files on the external server. This does indeed work, but I prefer having the files served from the sites application.
I see sites exposes a CSS type asset, but it seems to be tied to their widget framework. I was thinking to just make an empty widget with CSS, then I could reference the widget/asset in the <link href=. Again there aren't many examples of this online.
Can anyone give me some ideas on how to serve files from within WebCenter Sites?
There are alternatives to storing files directly in the webapp, such as using a custom basic assettype to contain the files, and then delivering them via blobserver (or just rendering inline). The advantage to this is that you are managing assets to keep environments in sync, rather than updating the webapp & redeploying.
The path needs to be relative to the web application context. There are probably better ways to reference it in Sites, but the lowest-common denominator approach that will work for all J2EE web applications is to use pageContext.request.contextPath, so the link would look like:
href="${pageContext.request.contextPath}/src/stylesheets/css/styles.css"
So if this were used with a JSK, the src folder would be under [JSK_HOME]\App_Server\apache-tomcat-7.0.42\Sites\webapps\cs
After reading the docs, it seems that phonegap/cordova is like a local web server that serves html, js and css to the mobile native browser.
Can phonegap/cordova serve files not only in local ? i want to know if it is possible to make them LAN servers for example, without installing apache on the mobile device??
Thanks.
UPDATE:
I feel i need to describe my probleme.
I need to create a mobile app, that allows mobile devices connected on the same wifi network (without internet) communicate with each others. If this is possible only with phonegap it would be great.
Cordova uses the WebView component to display your content. It's more or less equivalent to opening html files directly in your desktop browser by going to file > open.
If you want some content on a lan, just link to it in the html that is rolled into the Cordova app as you would load any content in html from an external source.
I have a project that loads http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js, I want to be able use this project offline
I tried to download dojo.xd.js and link to it locally but this still doesn't work offline
In firebug, on the net tab I can see that there are a lot more .js files that load
Is there a simple way of making this work offline?
The way of integration depends on your way of using it.
I assume you have webserver running locally (without inet access)?!
At the dojo website there are several ways of dojo integration available. Just download one of them (do not use CDN) and put the file on your local web server. Then it is available through the local url (can be relative to your site).
If you wan't to build an "offline" app without a webserver then take a look at Adobe AIR and interation of the dojo toolkit with Dojo Extensions for Adobe AIR.
Another option might be the integration together with PhoneGap or Cordova to build an offline App, e.g. for an IPhone etc. with HTML/Javascript. Win8/RT Applications for the M$ AppStore does support HTML/Javascript, too (have not tested this with Dojo).
Keep in mind there are also some security restrictions (e.g. loading and execution of JavaScript) if you plan to "release" your app as simple html file (click to open in browser).
I have a simple site, that uses just four HTML pages. One page has a <div id=main_container /> element. From the GWT application I use the RootPanel.get("main_container") to access that element. The GWT app uses GWT-RPC to connect to a server (written in java). My problem is how to test it on xampp, because if I compile the GWT app and upload the war files and put inside it the four HTML files, then I can access all of the pages except the one that contains the <div> element. I need some help here!
If you are using GWT-RPC, you also need an Application Server like jetty or tomcat. Apache alone is not enough.
If you are developing your app, there is no need for apache as you can run your whole web app in DevMode or just jetty.
In production what you want to do is set up Apache as a proxy to your web app running on jetty. Just to be clear, you cannot run a GWT app that also uses GWT-RPC on most shared host environments.