Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/grails/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp 如何解决liferay选项卡中的核心\u rt标记库问题?_Jsp_Liferay - Fatal编程技术网

Jsp 如何解决liferay选项卡中的核心\u rt标记库问题?

Jsp 如何解决liferay选项卡中的核心\u rt标记库问题?,jsp,liferay,Jsp,Liferay,在view.jsp中使用选项卡概念时,我遇到以下错误: 在使用jstl时,绝对uri:无法在web.xml或与此应用程序一起部署的jar文件中解析。我已经添加了jar文件jstl-1.2.jar文件。下面是my view.jsp:有人能帮我找到正确的代码吗 <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <%@ taglib uri="http://liferay.com/tld/port

在view.jsp中使用选项卡概念时,我遇到以下错误: 在使用jstl时,绝对uri:无法在web.xml或与此应用程序一起部署的jar文件中解析。我已经添加了jar文件jstl-1.2.jar文件。下面是my view.jsp:有人能帮我找到正确的代码吗

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@page import="com.liferay.portal.security.permission.*" %>
<%@page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@page import="com.liferay.portal.theme.*" %>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>


//A renderURL is created because we need to render a jsp page you need to use //renderURL we can also  pass parameters if required

<%
//We must Specify a default value for tabs. In this example it is sunday. Else it //will throw an error.
String tabValue = ParamUtil.getString(request, "tab", "sunday");
String tabsURL = "/html/tab" + tabValue.trim() + ".jsp";
String tabNames="Sunday,Monday,Tuesday" ;
String tabVal="sunday,monday,tuesday" ;
%>

<liferay-ui:tabs
names="<%=tabNames%>"
tabsValues="<%=tabVal%>"
param="tab"
url="<%= portletURL %>"
/>

//创建renderURL是因为我们需要呈现jsp页面。您需要使用//renderURL,如果需要,我们还可以传递参数

web.xml

<jsp-config>
    <taglib>
        <taglib-uri>http://java.sun.com/jstl/core_rt</taglib-uri>
            <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
        </taglib>
</jsp-config>

注意:编辑是根据注释完成的,在
web.xml

<jsp-config>
    <taglib>
        <taglib-uri>http://java.sun.com/jstl/core_rt</taglib-uri>
            <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
        </taglib>
</jsp-config>

注意:编辑是根据未找到的注释文件“/WEB-INF/tld/c.tld”完成的。我从哪里得到这个?“liferay插件包.properties”打开该文件并从UIcan添加“c.tld”你能解释清楚吗..我没有正确理解。我不知道在哪里添加该c.tld文件。我只有jstl1.2.jar文件,没有c.tld文件。请帮助我添加了c.tld。但是我得到了异常:java.lang.ClassNotFoundException:org.apache.taglibs.standard.tlv.JstlCoreTLV,未能加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.jstlcoretlvd。您的web inf/lib目录?文件中有jar吗找不到“/WEB-INF/tld/c.tld”。我从哪里得到这个?“liferay插件包.properties”打开该文件并从UIcan添加“c.tld”你能解释清楚吗..我没有正确理解。我不知道在哪里添加该c.tld文件。我只有jstl1.2.jar文件,没有c.tld文件。请帮助我添加了c.tld。但是我得到了异常:java.lang.ClassNotFoundException:org.apache.taglibs.standard.tlv.JstlCoreTLV,无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.jstlcoretlvd。您的web inf/lib目录中是否有jar?