users@glassfish.java.net

Re: JSF tags are not interpreted by the server

From: emiddio-frontier <emiddio_at_frontier.com>
Date: Tue, 22 Nov 2011 07:00:12 -0800

jsf only processes pages from special locations -- like typically
http://someWebsite/someWebApp/faces/somePage.xhtml;
if you accessed the page from
http://someWebSite/someWebApp/somePage.xhtml
--it would probably looklike you describe.

gary

----- Original Message -----
From: <forums_at_java.net>
To: <users_at_glassfish.dev.java.net>
Sent: Tuesday, November 22, 2011 6:35 AM
Subject: JSF tags are not interpreted by the server


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