AppFuse font-awesome webjars error - font-awesome

I am trying to add font-awesome to my AppFuse (v3.0) application. I added the webjars library as below:
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>4.0.3</version>
</dependency>
and modified the wro.xml file to:
<!-- CSS URL Rewriting fails when using webjar resource locator:
https://github.com/alexo/wro4j/issues/127 -->
<group name="main">
<css>classpath:META-INF/resources/webjars/bootswatch/3.0.0/spacelab/bootstrap.min.css</css>
<css>/styles/style.css</css>
<css>classpath:META-INF/resources/webjars/font-awesome/4.0.3/css/font-awesome.min.css</css>
<js>classpath:META-INF/resources/webjars/jquery/1.8.3/jquery.min.js</js>
<js>classpath:META-INF/resources/webjars/bootstrap/3.0.2/js/bootstrap.min.js</js>
<js>classpath:META-INF/resources/webjars/jquery-cookie/1.3.1/jquery.cookie.js</js>
<js>/scripts/script.js</js>
</group>
When loading the contents of the page I get the following errors:
java.io.IOException: No resource found for wildcard: fontawesome-webfont.woff?v=4.0.3
at ro.isdc.wro.model.resource.locator.wildcard.DefaultWildcardStreamLocator.triggerWildcardExpander(DefaultWildcardStreamLocator.java:175)
at ro.isdc.wro.model.resource.locator.wildcard.JarWildcardStreamLocator.locateStreamFromJar(JarWildcardStreamLocator.java:155)
at ...
java.io.IOException: No resource found for wildcard: fontawesome-webfont.ttf?v=4.0.3
...
etc
It looks like there is a problem with retrieving the "fonts" files that come with font-awesome library. Has anybody ran into this problem before? Is there a better way of handling this?
I am pretty new to AppFuse so any help would be appreciated. Thanks.

Replace the "fontawesome-webfont.woff?v=4.0.3" with "fontawesome-webfont.woff". The "?" character is treated as a special character matcher. This can be treated as a bug with the current version of wro4j, but I'll open an issue and it will be fixed for next release of wro4j.

Related

Nativescript image capture issue

I'm using Native script angular for my application. I need a camera and file browse feature.
I have tried the below two plugins for the camera feature
https://github.com/nstudio/nativescript-camera-plus
https://www.npmjs.com/package/nativescript-camera
But it is not supported me. It throws the below error
I have modified the App_Resources/AndroidManifest.xml file with the below content which I have seen this solution in some forums. But this is also not get fixed.
<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.*.*.fileprovider" android:exported="false" android:grantUriPermissions="true" tools:replace="android:authorities" > <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/file_paths" tools:replace="android:resource" ></provider>
Please suggest me to fix this issue.
13/Dec/18
Still Im in stuck.

Razor RenderPage my.js without HttpException

Suppose I want to render javascript from an external file inline into my layout file for performance reasons.
If I use the following Razor code
<script>
#RenderPage("~/Content/my.js")
</script>
results in
Server Error in '/' Application.
The following file could not be
rendered because its extension ".js" might not be supported:
"~/Content/my.js".
If I merely rename my javascript file to my.js.cshtml
<script>
#RenderPage("~/Content/my.js.cshtml")
</script>
The peasants rejoice.
The question:
Is there any simple way for me to prevent RenderPage from nagging such that I can tell it that the .js extension is fine?
With some feedback from #choudeshell one potential solution is:
<compilation debug="true" targetFramework="4.5">
<buildProviders>
<remove extension=".js"/>
<add extension=".js" type="System.Web.WebPages.Razor.RazorBuildProvider,
System.Web.WebPages.Razor"/>
</buildProviders>
</compilation>
What type of side effects would there be from removing whatever the default is for .js, any?

Accessing "test.html" page from the browser at the following url http://mysharepointservername.com/test.html

Which directory should I use to place test.html to access it via the browser by using the following url:
http://mysharepointservername.com/test.html ?
If I place the file to C:\inetpub\wwwroot\wss\VirtualDirectories\80 , I get 404 not found error.
Is there another directory I should use to place test.html?
Thank you in advance
You can create a module in sharepoint and place test.html under that module.
And in elements.xml write:
Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="CustomPage" Url="">
<File Url="CustomPage\test.html" Name="test.html" Type="Ghostable" />
</Module>
</Elements>
And deploy this module using feature.
In this way you can access the page with http://mysharepointservername.com/test.html

JSTL tag not translate in HTML

My imports :
xmlns:c="http://java.sun.com/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
My JSTL Code :
<h:outputLabel value="YESS" >
<fmt:formatNumber value="0.25" type="percent"></fmt:formatNumber>
HTML generated code:
<label>YESS</label>
<fmt:formatNumber value="0.25" type="percent"></fmt:formatNumber>
The generated code show that the JSTL core is translate in HTML.
But the JSTL "fmt" is not translate in HTML.
More information:
<fmt:ErrorInThisFunctionName value="0.25" type="percent" /> ===> generate an error
I work on Tomcat 6
What Pierre said, and also,
Try xmlns:fmt="http://java.sun.com/jstl/fmt"
Check web.xml for
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
suggestion:
check your TLD file.
check your header (DTD, attributes) in your web.xml
If you are using the normal JSP syntax and not the XML-based syntax try using
<%# taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
xmlns:c="http://java.sun.com/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
The URI for core taglib is invalid. It should be http://java.sun.com/jsp/jstl/core as per its TLD, with /jsp. The URI for format taglib is perfectly fine as per its TLD.
Does the core taglib work in any way? If it doesn't work as well, then it simply means that JSTL is not installed at all. Tomcat does not ship with JSTL by default. You need to download jstl-1.2.jar and put it in /WEB-INF/lib of your webapp. That's all. Do not extract the JAR file and put its loose contents (TLD files and so on) in the classpath as some poor tutorials suggests. It will only get worse. If you already did so, you should cleanup. Only putting the JSTL JAR in classpath is enough.
I had the exact same problem where I would basically declare and it wouldn't get translated into HTML (basically, instead of printing the variable, the entire c:out was printed in the html source). I had forgotten to add this dependency to maven:
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
(If the xml doesn't print, the groupId is taglibs, the artifactId is standard, and the version is 1.1.2

Showing HTML reports in CruiseControl dashboard

I have been looking into CruiseControl configuration recently (I'm a complete CC noob) and so far I understand that various XML reports generated by your build process (eg mbunit.xml, ncover.xml, fxcop.xml) can be shown in the dashboard by adding a reference to the xml to the following part of the ccnet.config:
<publishers>
<merge>
<files>
<file>logs\some-report.xml</file>
</files>
</merge>
</publish>
adding an xsl file to transform the xml into presentable html and adding a report build plugin to dashboard.config which references the xsl:
<xslReportBuildPlugin description="Some report"
actionName="SomeReportAction" xslFileName="xsl\some-report.xsl" />
My question is: if I have some reports (code documentation generated by JGregory's Docu and test specs generated by jpboodhoo's Bdddoc) which are pure HTML, is there any way I can show these in the dashboard in a similar way? I can't figure this out. I did think of adding an ExternalLink directly to the HTML page, but this is in a protected area which users normally cant access. Anyone any ideas?
Currently this is not possible in CruiseControl.NET up to version 1.4.4. However this functionality is being added as part of version 1.5.0.
We can't give you a timeframe on the release yet, but you can download and try out the latest version from http://ccnetlive.thoughtworks.com/CCNet-builds/1.5.0/.
Craig
As craig already mentioned this functionality was added in CCNet 1.5, you'll find the documentation about the HtmlPlugin here: http://cruisecontrolnet.org/projects/ccnet/wiki/HtmlReportPlugin