【问题标题】:Cannot deploy JSF application on GlassFish 4 server无法在 GlassFish 4 服务器上部署 JSF 应用程序
【发布时间】:2015-10-29 00:02:28
【问题描述】:

您好,我是 JavaServer Faces (JSF) 技术的新手,在成功设置了从 Eclipse Mars JavaEE 到 GlassFish 4.0 服务器的所有内容后,我遇到了以下问题:

在 Eclipse 创建我的项目之后,我创建了一个动态 Web 项目并将 JavaServer Faces 添加到配置中,当我尝试将项目部署到我的 GlassFish 服务器时,我收到以下错误消息:

cannot Deploy JavaServerFaces
deploy is failing=Error occurred during deployment: 
Exception while deploying the app [JavaServerFaces] :
org.xml.sax.SAXParseExceptionpublicId:file:*/glassfish4/glassfish/lib/schemas/web-app_3_1.xsd; 
lineNumber: 281; columnNumber: 47; 
Deployment descriptor file WEB-INF/web.xml in archive [JavaServerFaces].  
src-resolve: Cannot resolve the name 'javaee:web-commonType' to a(n) 'group' component.. 

当我从我的项目中删除 web.xml 文件时,我可以部署我的项目并且一切正常,但问题是我无法定义任何 servlet 映射,也无法设置欢迎页面...

如果您能给我解决这个问题的任何帮助或建议,我将不胜感激。

更新

我的web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
     version="3.1">
</web-app>

【问题讨论】:

  • 显示web.xml,好像是语法错误。
  • @PetrMensik 感谢您的回复,我添加了我的web.xml 文件。你能找到一些语法错误吗?

标签: jakarta-ee web.xml glassfish-4 eclipse-jee


【解决方案1】:

我会邀请你检查这个web.xml validation error 根据错误消息中的最后一句话,这似乎与您的问题相似

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-07
    • 2013-05-01
    相关资源
    最近更新 更多