Hallo,
ich versuche gerade etwas mit Facletts rum. Aber ich krieg das nicht auf die Reihe. Kann mir vielleicht jemand helfen?
Wenn ich die Application starte bekomme ich im Browserfenster folgende fehlermeldung:
Es ist eigentlich ein einfaches Beispiel und noch dazu so ziemlich genau abgeschrieben, aber es geht nicht. (Ich hab schon geschaut, ob unter meinem PC ein alter indianischer Friedhof ist, aber auch das hat nicht weitergeholfen)
Bin fuer jede Hilfe dankbar
Was ich bisher habe ist:
Das Template test.xhtml:
Ein default Content login.xhtml:
web.xml sieht so aus:
[XML]<?xml version='1.0' encoding='UTF-8'?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>JSFReg</display-name>
<description>Simple Registration Application</description>
<context-param>
<description>
Tell the runtime where we are in the project development
lifecycle. Valid values are:
Development, UnitTest, SystemTest, or Production.
The runtime will display helpful hints to correct common mistakes
when the value is Development.
</description>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>faces/login.xhtml</welcome-file>
</welcome-file-list>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>[/XML]
ich versuche gerade etwas mit Facletts rum. Aber ich krieg das nicht auf die Reihe. Kann mir vielleicht jemand helfen?
Wenn ich die Application starte bekomme ich im Browserfenster folgende fehlermeldung:
Error Parsing /login.xhtml: Error Traced[line: 6] The value of attribute "xmlns:ui" associated with an element type "null" must not contain the '<' character.
Es ist eigentlich ein einfaches Beispiel und noch dazu so ziemlich genau abgeschrieben, aber es geht nicht. (Ich hab schon geschaut, ob unter meinem PC ein alter indianischer Friedhof ist, aber auch das hat nicht weitergeholfen)
Bin fuer jede Hilfe dankbar
Was ich bisher habe ist:
Das Template test.xhtml:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html
xmlns:q="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<title>Facelets-Test</title>
</head>
<body>
<div>
<h1>Facelets-Template</h1>
</div>
<ui:insert name="content">
Default Text for content
</ui:insert>
</body>
</html>
Ein default Content login.xhtml:
HTML:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui='http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:body>
<ui:composition template="test.xhtml">
<ui:define name="content">
<h:form>
<h:outputText value="Halloooo!!!" />
<h:commandButton value="OK" />
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
web.xml sieht so aus:
[XML]<?xml version='1.0' encoding='UTF-8'?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>JSFReg</display-name>
<description>Simple Registration Application</description>
<context-param>
<description>
Tell the runtime where we are in the project development
lifecycle. Valid values are:
Development, UnitTest, SystemTest, or Production.
The runtime will display helpful hints to correct common mistakes
when the value is Development.
</description>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>faces/login.xhtml</welcome-file>
</welcome-file-list>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>[/XML]