Custom fonts not getting uploaded in Openshift server - tomcat6

I have developed an application which uses custom CSS3 fonts. But somehow custom fonts are not getting uploaded in the server. My application URL is http://techcurt-kshitiz.rhcloud.com and when I try to access custom font like http://techcurt-kshitiz.rhcloud.com/resources/css/LindenHill-webfont.eot, The requested resource is not available appears. Custom fonts are working fine in my local machine in every browser.
I have recreated my application but still the problem persists. I have been using Openshift since an year but never faced such issue. What can be the possible reason for it? Even .less file is not getting uploaded. I am using tomcat 6 server in Openshift. I am not able to find out any solution in Google.

Do you see the files on disk when you SSH to the gear?
Are the files checked into Git? It's possible that they are being ignored by git, and hence not uploaded. You can check that the file is in git with "git show master:" - if ignored it won't show up.
Otherwise, it could be something in your build - perhaps the files are getting deleted?

Finally my issue is solved by servlet-mapping .ttf and .eot files in my web.xml files. But I am not able to understand how come my application was running in local machine but not in server? How come thats possible?

Related

react-app from subdirectory does not get loaded

I'm working for educational purpose on create a react app and serve it in a subdirectory of an existing domain which already hosts a web application.
Just to try to be more clear I have this situation:
www.mydomain.com (this is a web application currently online)
Now I need to put this new web app under
www.mydomain.com/test
To try to make it work I have my wwwroot folder with my brand new subfolder wwwroot/test.
Now the problem is that if I just put (in wwwroot/test) a simple html file with nothing more than just an <h1> tag, I can open the URL and see the content in it.
If I put my react-app (which work fine in my develop environment) I just see an empty page and if I open the inspector I see that some of the necessary resources aren't reachable because their requests point to root domain (www.mydomain.com/css/ionicons.min.css instead of www.mydomain.com/test/css/ionicons.min.css).
This is my very first time with IIS and I'm trying to get it work by myself, but it seems that I'm unable to find a proper solution to my problem...
Hopefully I was clear enough!
thanks in advance to all who will spent some time reading about this!
I've already made some research and all of them seems to point to some kind of redirect/rewrite rule to write in the web.config of my subdirectory app and/or in the web.config of the root app.
I've also tried to put "homepage": ".", in the package.json which solved the problem of the resources not getting loaded from the proper path but the page is still blank.

Can synchronised browser testing be achieved when the user script (Tampermonkey) is developed locally?

I am developing a user script (Tampermonkey) locally. When the local JS changes, I want to automatically refresh the target URL of the user script instead of a local HTML file.
How can this be achieved? I checked every command and configuration information, but did not find a solution, so I came to ask for help.
The method of developing UserScript locally is seen here. The answerer mentioned that browser-sync can be used, but I did not find a way to achieve it.
livereload can solve this problem very well, because livereload is implemented through browser extensions and local programs. When the file changes, the target URL can be refreshed immediately.
http://livereload.com/
https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei/related

IBM Worklight - App only starts once; gives error after saying Failed to load webpage

I created an iphone app in IBM Worklight using Angularjs, generated by yeoman. Everything works fine in the simulator, but when I deploy to my physical device, the app will open only once. Using the iphone configuration utility, the error reported merely says Failed to load webpage at that url.
I do not understand why it would only work one time.
It don't think this has got anything to do with angularjs and/or yeoman.
It sounds like you've changed the HTML filename in the common folder and the mainFile value in application-descriptor.xml. Changing the mainFile value used to cause a bug after launching the app a second time - it wouldn't find the resource, the HTML file.
If you indeed did the above, try the following:
Rename the application folder name to match the renaming you've done above
update the ID attribute of the application element in application-descriptor.xml to match as well
Make sure to delete the native folder
Re-build and deploy the app
This should now make the app launch a second, third, ... time as well.
Fixed in the upcoming Worklight 6.1.0.

Ajax-Solr Installation

I am not able to set Ajax-Solr on my system.I did a bit of R&D on Ajax-Solr for the same .
I understood what it tries to do with the tutorial provided at https://github.com/evolvingweb/ajax-solr/ , but unfortunately, I am not able to able to set it up on my system.
I dont know how to integrate it with Solr. Into which directory of Solr instance does Ajax-Solr goes?(I know it doesn't matter where Ajax-Solr folder is kept but still just to to be sure)
I changed my solrURL to "http://localhost:8080/solr/" in reuters.js file.But still when i browse to "http://localhost:8080/solr/", it still shows the same backend Solr UI. (This may sound a kinda noobish)
Can you please suggest me how to get the Ajax-Solr front end UI ??
Please suggest something.
Thanks
Regards
ajax-solr is just HTML, CSS, and JS. You can open the demo index.html from your harddrive in a browser and it will work (i.e. no webserver!). When you deploy, you can use Apache, Nginx, Tomcat, whatever. If you can make your webserver display an HTML file, you can make it display HTML files that include the ajax-solr JS files.
You have to deploy the Ajax-solr web application either on jetty or on some web server or app server.
If you want to deploy this in jetty, you have to create a WAR file out of th. S reuters sample.
If you have Apache on your machine, you can copy this to the htdocs folder, for eg.

VS2010 Code: 2104 Could not download the Silverlight application

I've just started getting this Javascript error running VS2010 with SL4
Error: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
Everything was working fine, changed 1 line of code to use a RegularExpression in the web project (using the Silverlight Business Application template) then when rebuilding I get this error.
Google says this is IIS and mimetype related. I'm using Cassini not IIS with VS2010.
Rebooted, cleared xap from IE cache. Error on both IE and FF.
What could be wrong?
I just got this error myself. Looking at source control and my project I noticed that the original test pages that were created when I setup the project got replaced by two new test pages (one .aspx and one .html).
I removed the newly created pages and went back to the old test pages and things started working.
If your situation isn't the same as mine, then just check your silverlightControlHost div in your test page and make sure you are pointing to the correct .xap file and runtime.
if youre not running in IIS then just check your silverlightControlHost div in your test page and make sure you are pointing to the correct .xap file and runtime.
If you were in MVC you could do something similar...
<param name="source" value="#Url.Content("~/ClientBin/NameOfYourSlAppGoesHere.xap")" />
Follow the Step :
On Hosting project, Properties > Silverlight Applications > Add..
This solved my Problem.
Simple error.
I had the same error with my provider. When I looked at the MIME type everything seemed to be OK:
.xap => application/x-silverlight-app
which seems to be the default value on IIS 6. Then I looked at the webpage VS 2010 created and noticed that it has a MIME type of
application/x-silverlight-2
I changed the MIME type on IIS according to the webpage's type and - my silverlight application gets loaded without any error!
This error often occurs because the MIME type is not set, as you have found for yourself. It can also be a mask for the HTTP error. You can see the message by pulling up the XAP file directly from your browser (http://yourwebsite/ClientBin/filename.xap). The file will either attempt to download, or it will show you an HTTP Error.
I also had the same issue on VS 2010. And the reason was that the .xap file was not getting copied to ClientBin directory of the hosting web site project.
Reason was the association from the hosting web site project to the silverlight project was missing for some reason. (should be due to some restructuring of the projects that I've done recently in my case)
I had to re-add the association from the hosting web site project to the silverlight project.
Steps:
On Hosting project, Properties > Silverlight Applications > Add..
I faced a similar issue and it was solved with the help of this blog post: http://vanderbiest.org/blog/2009/10/27/2104-silverlight-initialization-error/
Just ensuring that IIS_IUSRS has read and read & execute permission on the XAP file might fix this issue.
.xap file was not getting copied to ClientBin directory
The problem in my case was that http://mysite/ClientBin/MyApp.xap was returning a 404. The build process was copying the XAP file into /ClientBin/DEBUG/ - I expect this is because someone told it to copy the XAP file to a config specific folder. To fix it I did the following...
Go to the properties of your website.
Go to the Silverlight Apps page.
If your Silverlight app is already referenced there, remove it.
Now click Add.
Select your existing SL app.
Make sure "Copy to a config specific folder" is NOT checked!
for my case it occured In IE and in chrom the project work.
it resolved by
disable protected mode in IE.(Internet Option -->Security)
For my case (with visual studio 2012), one of the projects in the solution wasn't loaded...
right click->reload project.
fixed.

Resources