users@glassfish.java.net

JSF tags are not interpreted by the server

From: <forums_at_java.net>
Date: Tue, 22 Nov 2011 08:35:38 -0600 (CST)

I am in the middle of developing my first web app, and I have run into a
startling problem: my pages, containing <h:head> etc, suddenly no longer get
translated to proper html. I have probably made a stupid change somewhere,
but I can't spot it.

What on earth is likely to have this effect?

This is my code:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html
xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
    <h:head>         <title>Welcome to STAF</title>    
</h:head>     <h:body>         <fieldset>            
<legend>Random Results Page</legend>             <h:form>
                Press button to get on of three possible
results pages.                 <br/>
                <h:commandButton value="Go to random page"
action="#{navigator.choosePage}"/><br/>                
<h:commandButton value="STAF Session"
action="#{navigator.STAFSession}"/><br/>                
<h:commandButton value="Choose Language"
action="#{navigator.ChooseLang}"/><br/>             </h:form>
        </fieldset>     </h:body> </html>
- and this is what arrives at the browser:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html
xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
<h:head> <title>Welcome to STAF</title> </h:head> <h:body> <fieldset>
<legend>Random Results Page</legend> <h:form> Press button to get on of three
possible results pages. <br/> <h:commandButton value="Go to random page"
action="#{navigator.choosePage}"/><br/> <h:commandButton value="STAF Session"
action="#{navigator.STAFSession}"/><br/> <h:commandButton value="Choose
Language" action="#{navigator.ChooseLang}"/><br/> </h:form> </fieldset>
</h:body> </html>
As one can see, there is no change. I found some suggestions on the net that
it might be because the "xmlns=..." clauses were wrong, but these have worked
initially, and the are what NetBeans inserts when you start typing "<h:", so
they are probably OK.


--
[Message sent by forum member 'janpla']
View Post: http://forums.java.net/node/866699