Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JSF components and EL expressions in XHTML page(I see that el expression doesn't work in XHTML page and I can't get access to jsf components)
JSF components and EL expressions in XHTML page [message #878503] Tue, 29 May 2012 12:50 Go to next message
volodia levytskyi is currently offline volodia levytskyiFriend
Messages: 3
Registered: May 2012
Junior Member
I created maven project in eclipse. I added managed bean on "Managed Bean" tab in faces-config.xml. Now I want to have xhtml page with support of JSF components and bind some components to managed bean property.

When I create page with name "New Facelet Composition Page" I remove all that initial content and I have access to jsf components but EL expression doesn't work
When I create page with name "new facelet footer" I don't have access to jsf components
and when I add following lines I have error
<!--<html xmlns="//www.w3.org/1999/xhtml"-->
<!--xmlns:h="//java.sun.com/jsf/html"-->
<!--xmlns:f="//java.sun.com/jsf/core">-->
And error is:
Attribute "xmlns:h" must be declared for element type "html".
Attribute "xmlns:f" must be declared for element type "html"

When I create page with name "New JavaServer Faces (JSF) Page (xhtml, xml syntax)"
I have access to jsf components and EL expression works well but when I open my page with "System Editor" I have following error:
This page contains the following errors:

error on line 2 at column 2: StartTag: invalid element name
Below is a rendering of the page up to the first error.[/code]

Head of page with this error is (error is on line 2 column 2)
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!--"//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-->
<!--<html xmlns="//www.w3.org/1999/xhtml" xmlns:f="//java.sun.com/jsf/core" --><!--xmlns:h="//java.sun.com/jsf/html">-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
I removed "http:" in each url for xmlns because I can't set links yet.

Thank you for help!
Re: JSF components and EL expressions in XHTML page [message #878521 is a reply to message #878503] Tue, 29 May 2012 13:25 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 5/29/2012 6:50 AM, volodia levytskyi wrote:
> I created maven project in eclipse. I added managed bean on "Managed
> Bean" tab in faces-config.xml. Now I want to have xhtml page with
> support of JSF components and bind some components to managed bean
> property.
> When I create page with name "New Facelet Composition Page" I remove all
> that initial content and I have access to jsf components but EL
> expression doesn't work When I create page with name "new facelet
> footer" I don't have access to jsf components
> and when I add following lines I have error
> <!--<html xmlns="//www.w3.org/1999/xhtml"-->
> <!--xmlns:h="//java.sun.com/jsf/html"-->
> <!--xmlns:f="//java.sun.com/jsf/core">-->
> And error is:
> Attribute "xmlns:h" must be declared for element type "html".
> Attribute "xmlns:f" must be declared for element type "html"
>
> When I create page with name "New JavaServer Faces (JSF) Page (xhtml,
> xml syntax)"
> I have access to jsf components and EL expression works well but when I
> open my page with "System Editor" I have following error:
> This page contains the following errors:
>
> error on line 2 at column 2: StartTag: invalid element name
> Below is a rendering of the page up to the first error.[/code]
>
> Head of page with this error is (error is on line 2 column 2)
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> pageEncoding="ISO-8859-1"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> <!--"//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-->
> <!--<html xmlns="//www.w3.org/1999/xhtml"
> xmlns:f="//java.sun.com/jsf/core"
> --><!--xmlns:h="//java.sun.com/jsf/html">-->
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> <title>Insert title here</title>
> </head>
> I removed "http:" in each url for xmlns because I can't set links yet.
>
> Thank you for help!

If you don't get an answer here, be sure to try the Eclipse web tools
JSF forum.
Previous Topic:Log to syslog
Next Topic:eclipse proxy setting on ubuntu 11.10
Goto Forum:
  


Current Time: Thu Apr 25 21:32:08 GMT 2024

Powered by FUDForum. Page generated in 0.08771 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top