Olá
Eu estou frequentando um curso de java web, e estou tentando através do método action ir de página a página só que dá o seguinte erro. Será que estou a fazer algo de errado? Fiz exactamente como foi feito na video aula.
HTTP Status 500 - Error Parsing /menu.xhtml: Error Traced[line: 2] The processing instruction target matching "[xX][mM][lL]" is not allowed.
type Exception report
message Error Parsing /menu.xhtml: Error Traced[line: 2] The processing instruction target matching "[xX][mM][lL]" is not allowed.
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error Parsing /menu.xhtml: Error Traced[line: 2] The processing instruction target matching "[xX][mM][lL]" is not allowed.
javax.faces.webapp.FacesServlet.service(Unknown Source)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
javax.faces.view.facelets.FaceletException: Error Parsing /menu.xhtml: Error Traced[line: 2] The processing instruction target matching "[xX][mM][lL]" is not allowed.
com.sun.faces.facelets.compiler.SAXCompiler.doCompile(Unknown Source)
com.sun.faces.facelets.compiler.SAXCompiler.doCompile(Unknown Source)
com.sun.faces.facelets.compiler.Compiler.compile(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(Unknown Source)
com.sun.faces.util.ExpiringConcurrentCache$1.call(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
com.sun.faces.util.ExpiringConcurrentCache.get(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(Unknown Source)
com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(Unknown Source)
com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(Unknown Source)
com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
javax.faces.webapp.FacesServlet.service(Unknown Source)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.88 logs.
Apache Tomcat/7.0.88
Meu código:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Navegacao</title>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="2">
<h:outputLabel value="Usuario" />
<h:inputText maxlength="10" size="15" />
<h:outputLabel value="Senha" />
<h:inputSecret maxlength="6" size="15" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:commandButton value="Entrar" action="menu" />
<h:commandButton value="Recuperar senha" />
</h:panelGrid>
</h:form>
</h:body>
</html>