java.lang.IllegalArgumentException:无效的URL模式:[xhtml] [英] java.lang.IllegalArgumentException: Invalid URL Pattern: [xhtml]

查看:810
本文介绍了java.lang.IllegalArgumentException:无效的URL模式:[xhtml]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试部署一个非常简单的&我的第一个JSF应用程序(遵循在glassfish本地服务器上使用BalusC ).我完成了创建应用程序的所有步骤.当我尝试在glassfish服务器上部署该应用程序时,它失败了,并显示以下异常消息:-

I am trying to deploy a very simple & my first JSF application (following a really good tutorial by BalusC) on glassfish local server. I completed all the steps to create the application. And when I tried to deploy the application on the glassfish server, it just failed with the following exception message:-

    cannot Deploy Playground
    Deployment Error for module: Playground: Exception while deploying the app : 
    java.lang.IllegalArgumentException: Invalid URL Pattern: [xhtml]

谁能解释这是哪里的问题,我该如何解决?

Could anyone explain where is the fault and how can I amend it ?

推荐答案

这不是有效的url模式.您可以将映射安排为前缀映射或扩展映射(来自 JSF 2.0规范):

This is not a valid url-pattern. You can arrange the mapping as prefix mapping or extension mapping (from the JSF 2.0 specification):

前缀映射:

<servlet-mapping>
  <servlet-name> faces-servlet-name </servlet-name>
  <url-pattern>/faces/*</url-pattern>
</servlet-mapping>

扩展映射:

<servlet-mapping>
  <servlet-name> faces-servlet-name </servlet-name>
  <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

这篇关于java.lang.IllegalArgumentException:无效的URL模式:[xhtml]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆