Jump to content
Fórum Script Brasil
  • 0

Erro no arquivo web.xml - parsing XML declaration: '?>' ex


victor182

Question

O arquivo web.xml é o seguinte:

<?xml version="1.0" encoding="UTF-8"?>


<!-- <?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' -->

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">

<display-name>FinanceiroWeb</display-name>
<display-name>Capitulo 2</display-name>
<servlet>
<display-name>FacesServlet</display-name>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name><!-- Serve para definir em qual fase de desenvolvimento encontra-se o projeto-->
<param-value>Development</param-value>
</context-param>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.jsf</welcome-file>

<!--
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
-->
</welcome-file-list>
</web-app>

O arquivo olamundo.xhtml:


<?xml version="1.0" enconding="ISO-8859-1"?>
<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>
<title>Teste inicial JSF</title>
</h:head> 

<h:body>
<h:outputText value="Olá Mundo"/>
</h:body>

</html>

Fiz exatamente igual como está no livro, porém não está funcionando, quan do rodo o servidor do TomCat, não mostra nenhum erro no console em tempo de compilação, porém no navegador exibe o erro: error on line 1 at column 19: parsing XML declaration: '?>' expected Estou utilizando o Eclipse Kleper e não há erros, apenas alertas nas tags , informando que não há referência.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      651.9k
×
×
  • Create New...