【问题标题】:Cannot redirect using c:redirect in JSF using JSTL无法在使用 JSTL 的 JSF 中使用 c:redirect 进行重定向
【发布时间】:2014-12-13 11:56:30
【问题描述】:

我的adminPanel.xhtml

<?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:c="http://java.sun.com/jsp/jstl/core">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
        <title>Insert title here</title>
    </head>
    <body>
        <c:redirect url="http://www.google.com"></c:redirect>
    </body>
</html>

当我运行上面的代码时,我得到:

HTTP 状态 500 - /loggedIn.xhtml @12,44 标记库 支持namespace: http://java.sun.com/jsp/jstl/core,但没有标签 为名称定义:重定向

【问题讨论】:

    标签: jsf jstl


    【解决方案1】:

    &lt;c:redirect&gt; 标签在 Facets 2.0 中不可用。对于可用或支持的标签列表。见Tag Library Documentation Generator。可以利用jsf页面导航进行重定向。

    类似主题:

    Explicit url redirect in JSF 2.0

    还有教程:​​

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-24
      • 1970-01-01
      • 2012-01-21
      • 1970-01-01
      • 1970-01-01
      • 2015-07-09
      • 1970-01-01
      相关资源
      最近更新 更多