How to bootstrap UI5 resources without CDN in Eclipse? - eclipse

I'm doing a walkthrough for SAPUI5.
The code src="/resources/sap-ui-core.js" doesn't work, because I can't find this directory in my project.
When using a CDN URL, it works fine. But I don't want to use CDN for my application.
So how can I get and import the sap-ui-core.js file into my project so that it is saved on my computer locally?
I'm working with Eclipse btw. and installed the SAPUI5 Tools for Eclipse.

The SAPUI5-Plugin for eclipse includes the SAPUI5 library files.
If you start the App using "Run as..."->"Web App Preview" on your index.html, eclipse starts a jetty http server which serves the SAPUI5 library at /resources.
As long as you don't close the preview window in eclipse you can use any browser to debug your application at the url you find in that preview window.

Check that the dependencies are correct in your project, because the general dependency file such as sap.m may be missing in the project file.

Related

How to get JETTY_BASE to work with Eclipse GWT project

I have a google web tool project that uses
serverHome = System.getProperty("jetty.base");
to build a file path. When I run this in Eclipse GWT Development mode, this is returning null which is breaking the file paths for the rest of my application. Is there any way to assign jetty.base or JETTY_BASE to my Google Web Tools project?

Appengine endpoint client library creation in eclipse

I have a java based appengine endpoint project in eclipse.
When I generate client library using command line tool.
https://developers.google.com/appengine/docs/java/endpoints/endpoints_tool
I'm getting only source based jar file ('project_name_version'.java-1.18.0-rc-sources.jar). It does not work fine in Android Studio when I add as a Library.
How can I get class based jar client library (google-api-services-'project_name_verison'-1.18.0-rc.jar)?
I tried searching online but no luck yet.
You could always zip up the sources file and use them in Android Studio. However , note that in the build.gradle file, you will have to reference the other dependent JAR files + versions that will be needed by the sources that you have generated in Eclipse via the Generate Cloud Endpoint Library option.
Build your app engine back end with JRE 7. You can change this from windows->preferences->java->installed JREs. You'll find an Add button at the right side of the pane. For more detail refer this Tutorial
This will solve most of your problems.

Issue with deploying GWT app to tomcat in eclipse

Following this tutorial, I could execute GWT app using eclipse. I could access the app at http://127.0.0.1:8888/De_vogella_gwt_helloworld.html?gwt.codesvr=127.0.0.1:9997.
Then, I googled to find a way to deploy the app to tomcat, and I found this site. It has two step way to exporting GWT app to tomcat.
Exporting the src directory into jar file.
Using ant create a war file.
I copied the hello.war file into /Library/Tomcat/webapps, and open the browser with localhost:8080/hello to get this error.
When I click the HTML file in webapps directory, so I think something's wrong with the packaging.
What might be wrong?
You need to compile your GWT app to run in production mode. See this section of the GWT doc for detailed steps (for GWT 2.4).
From David's answer, I could get it working.
I had to compile the application again.
to get it working.

Difficulty to run simple GWT application

I am making gwt application as following step:
Firstly I install gwt plugin in my eclipse(Helios).
Create dynamic project.
Add gwt plugin through
going to property page of the project
Select google-webtoolkit
check "use GWT"
then go to google-web application
the directory name to "web-content".
Create gwt module in my project then create entry point class then html.
Create a button in onModule method of entry point class.
Then I run the application in tomcat server by just right clicking on project and selecting run as web application(run with tomcat server). As result of this I am getting a blank page on browser? There is no excption in server log. I am not able to debug. Where I am going wrong?
Please help me to sort out this problem.
I am not using google web application because I was getting difficulty to create war file. As a result of this I got the above process to develop GWT application.
Thanks
Rahul
why don't you try in reverse:
First install gwt plugin in my eclipse(Helios).
Create GWT project
Add Dynamic web plugin
going to property page of the project
project Facets tab
Select Dynamic Web Module and java
ok to apply changes.
Write your code
and try to run on server. it will work.

PlayN Maven Archetype and Running HTML5 in Eclipse

I generated a skeleton PlayN project from the playn-archetype and imported into Eclipse via m2e after verifying a successful build via
mvn clean package
After using the Google Plugin for Eclipse to successfully compile the html subproject, I then right click on the html subproject and perform a Run As -> Web Application.... Per the 'Getting Started' instructions on the PlayN wiki, I attempt to load the resulting Development Mode URL minus the ?gwt.codesvr=120.0.0.1:9997 suffix and am greeted with a dialog containing the following:
GWT module named 'project' may need to be (re)compiled.
I have verified that the <script> tag in my project.html is pointing to the appropriate javascript file (project/project.nocache.js), and I've verified that said javascript file exists and its contents browsed when navigating directly to it (i.e. http://127.0.0.1:8888/project/project.nocache.js).
The project works fine (albeit slowly) when the ?gwt.codesvr=120.0.0.1:9997 suffix is part of the URL (which is expected), and it also works fine when running mvn gae:run from the html subproject folder and browsing to http://127.0.0.1:8080/.
This is more of an annoyance than anything else, but I would at least like to know why it's happening and how to fix it :).
After you started the web application with "Run as... Web application" you need to recompile the project again (while the web application is running).
When you refresh your browser (be aware of the browser-cache) it should work.
This is a known issue is some older versions of PlayN.