0

Recently i add the diferent scope code for better performace the jsf livecycle. Has error in runtime for acess jsf page. What happened?

Web.xml file:

<context-param> <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value> </context-param> 

jsf (xhtml) file:

<?xml version='1.0' encoding='UTF-8' ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:p="http://primefaces.org/ui" xmlns:tjfw="http://tjfw.tjba.jus.br/tjfw/jsf/components/ui" xmlns:c="http://java.sun.com/jsp/jstl/core" template="/WEB-INF/templates/main.xhtml"> <ui:define name="contents" <f:view> <t:document> <t:documentHead> ... <title>example</title> ... </t:documentHead> <t:documentBody> ... </t:documentBody> </t:document> </f:view> </ui:define> </ui:composition> 

Console error:

09:40:39,476 FATAL [org.jboss.seam.faces.view.SeamViewMetadata] Error Parsing /resources/pages/objectPearson/pearson.xhtml: Error Traced[line: 188] The prefix "t" for element "t:document" is not bound. 
3
  • 2
    You did not declare the t namespace (there is no xmlns:t="..." in your JSF). You need to declare this using the appropriate namespace URI. Commented Jul 17, 2017 at 12:56
  • Because I received negative feedback on this question? Commented Jul 18, 2017 at 17:07
  • I don't know why people vote your question down. But you better get used to that if you ask questions on StackOverflow - it's often not a friendly place for people who ask questions... Commented Jul 18, 2017 at 19:24

2 Answers 2

4

According with @Jesper

You are trying to acces a library that you didn't declare where to found it.

This 't' is a namespace that you didn't daclare.

Example: Here you use <f:view> and this 'f' is a namespace for this URL :

xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" 

So you are using a namespace undefined, check out the URL for this namespace 't'

Try this:

xmlns:t="http://myfaces.apache.org/tomahawk" 
Sign up to request clarification or add additional context in comments.

Comments

0

I think if you don't include the library and the assigned prefix (xmlns:t), you can not use it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.