Hello, I have a JSF page and wants to display an audio file.
The "test.wav" file is under my /src/main/webapp/resources/audio/test.wav. However, in browser, I can't see any sign of the audio file. I want to click it in browser and hear the sound. Also, in my Eclipse editor, there is a yellow warning message in this line, indicating "unknown tag (audio)".
What's the right way to play an audio in a JSF file?
Although the following HTML5 tag works in my JSF page, why does it remind me that "audio" is an unknown tag? There is a yellow flag that indicates it's an invalid tag. I am developing in Eclipse. Thanks.
This is the Eclipse editor checking your XML/HTML. To make it stop complaining, you have to attach an XSD namespace (schema) to your document and you have to have it registered with Eclipse, so that the Eclipse XML verifier can apply the rules in that schema to properly validate the document.
This is not a JSF issue, it's strictly a problem with Eclipse. If you want more information, you'll need to ask in the Eclipse (IDEs and Version Control) forum, and it's best to ask as an XML/HTML question, because it literally has nothing to do with JSF beyond the fact that the JSF View Template Language is XML-based.
Personally, I find the process of getting Eclipse to adopt new XML schemas more frustrating than it ought to be, and usually I find it easier to ignore the little yellow boxes than to spend the time and effort needed to shut it up. It's the little red boxes I worry about.
Science is the process of replacing what we "know" with what is TRUE. Politics, alas, often prefers to be the opposite.
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad: