I am working on a dynamic web project in eclipse. Until yesterday, we were using CVS for our version control system. When I made any change on a javascript file, I would just save the file and refresh the browser and the change would be there.
However, since I started using Git, I need to publish to the weblogic server in order to see the changes in my browser.
I am not sure what is causing this problem.
The problem was solved.
I changed a setting in eclipse publishing mode from:
Publish as an exploded archive
to
Publish as a virtual application
It isn't related in anyway to Git vs CVS, it's just that I downloaded a new eclipse and the default setting was different from what I previously had.
Related
I want copy all files in a web directory on a webserver, and ideally in its component subdirectories, into local device storage for Android and iOS in Cordova using javascript and/or cordova plugins.
The use case is to copy an entire (smallish) webapp/page from a remote webserver (that we control, and where we posted the content) into local storage on the device. This will be used for a form of hot code push for a cordova app.
It's possible to copy files using cordova-plugin-file-transfer:
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/
or in a more standards-compliant way using XMLHttpRequest (XHR):
https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html
How does one copy an entire directory tree, overwriting an existing one, in device storage.
Preferable: method to include error handling for the case that something prevents the full copy from happening, possibly resulting in a partial copy or a corrupted directory.
Is there an api or combination of apis that do this already? If not, does someone have or know of code to accomplish this?
Thanks!
You can look at hydration of phonegap for hot push :
http://docs.phonegap.com/phonegap-build/tools/hydration/
I think it may be suitable for your need.
However, be very careful with hot code push because apple doesn't like it very much and it's rather contrary to their guideline.
I have a website hosted that I am using Aptana to connect to the server via SFTP and edit the files there. When I preview the html file, it seems to store a temp version of the file on my local drive:
file:///C:/Users/username/AppData/Local/Temp/aptanavfs/aptanavfs2715860739108955789index.html
instead of using the live version... and this seems to cause it to not load the CSS/JS (I guess it's not making a copy of these files to the temp path).
What's going on? When I view the site live on the internet, everything is working fine.
The files from your remote server might not be synchronized with the files on your computer.
Check your Synchronization options to ensure you tell Aptana to 'sync from your remote site to your machine' - if you do not have all the files from the server on your computer, you need to do this at least once before you start working on your changes.
After this, you will want to decide how to keep the changes made on your computer in sync with the server (either manually upload them yourself, or tell Aptana to automatically synchronize them)
Check this page for a brief tutorial on how to set up the sync options (step 7):
http://www.danielrosca.ro/blog/en/aptana-studio-and-ftp-server/
I'm building an app using angular. The app will run on the clients computer. When an update is there it will download a zip file from the server and upgrade the required files.
I guess js and html is incapable of copying and modifying files. Our first idea was to run a background application on the os to check for updates and do the updates as necessary. But what other approaches are there to achieve this?
Even if the application is offline, you can still host it, just use AppCache or something like it.
See this post for a tutorial:
http://www.sitepoint.com/creating-offline-html5-apps-with-appcache/
I'm writing an asp.net project. When trying to fix a bug, I updated one of my javascript files and then deployed the new version on my server's IIS 6.0. I can see that the new javascript file has been updated on the physical folder of the website.
However, when verifying the bug from my local machine I found that it's not fixed. After some investigation, I realized that it's because the javascript file received by my browser is not the latest version.
I deleted IE's caches and the problem still exists. Then I tried to download the javascript directly from my website by using the url like:
http://myserver.mydomain.com/mywebsite/scripts/myscript.js
and found out the downloaded javascript file is of the old version.
Then I realized this is probably caused by a cache on the server side. I tried to set the server's IIS: on my site's "Output Caching" option, I unchecked "Enable cache" and "Enable kernel cache"
:
Also I added rules for .js and .css file:
After taking all these actions, I updated my javascript file on the server, restarted IIS and tried to download it from my local machine again.However, the javascript I downloaded is still not the latest version.
So my question is, what shall I do to make sure the the browser can immediately get the latest version of the javascript file on my server's disk? Thanks!
I use the old trick of js and css versioning, for example if I create a new js file I call:
new_1.0.0.js
Then, if for some reason I change, I will change the name manually to:
new_1.0.1.js
Also change all the parts where I Referencing. With this, your browser should always bring you the latest standalone version of the settings you have in the IIS. At least in my different jobs where I used II6 or II7 have applied and it has worked.
I'm working on a servlet/web services website, deployed in Tomcat 7.
The website is a single page application. Html/Css/JavaScript files are served as static content by the server, and then all the ajax calls are managed by Java webservices.
I'm using Eclipse for coding in Java, and WebStorm for HTML, CSS and JavaScript.
My problem is that changes made with WebStorm are not immediately reflected on the server, making it difficult to debug (changes made with Eclipse are immediately updated in the deployed site, however). WebStorm works on exactly the same files and folders as Eclipse, not on a copy.
Is it possible to configure the projects so that changes made with WebStorm are reflected in the server, without having to touch Eclipse?
Best,
Eloy
refresh your project in eclipse, or edit your static files with eclipse.
this is because the tomcat in eclipse publish the project in a temp folder to deploy it in tomcat.
you can also try to: open the tomcat server in the eclipse view "servers" by double clicking on it, and select the option "Serve modules without publishing"
Window-Preferenc-Workspac, check Refresh using native hooks or polling.
But you still need to wait 2-3seconds,and need to refresh your browser.
I am looking for a tool that can help me refresh broswer after code change.