Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/357.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.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
Java 在父jsp中包含两个jsp并将它们并排放置_Java_Html_Css_Jsp_Jspinclude - Fatal编程技术网

Java 在父jsp中包含两个jsp并将它们并排放置

Java 在父jsp中包含两个jsp并将它们并排放置,java,html,css,jsp,jspinclude,Java,Html,Css,Jsp,Jspinclude,我将一些问题放在JSP的一致性上。我有一个父JSP,它需要迭代一组特性,并将它们与中间的“|”并排放置。我编写的父JSP包含以下内容 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="horizonte-amazon-tags" prefix="hza"%> <%@ taglib uri="aui" prefix="a"%> <c:forEa

我将一些问题放在JSP的一致性上。我有一个父JSP,它需要迭代一组特性,并将它们与中间的“|”并排放置。我编写的父JSP包含以下内容

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="horizonte-amazon-tags" prefix="hza"%>
<%@ taglib uri="aui" prefix="a"%>

<c:forEach var="feature" items="${view.subfeatureMap['featureList'].subfeatures}">
    <c:set var="featureName" value="${feature.featureName}" />
    <c:choose>
            <c:when test="${featureName eq 'first'}">
                    <jsp:include page="../first/common.jsp" />
            </c:when>
            <c:when test="${featureName eq 'second'}">
                    <jsp:include page="../second/common.jsp" />
            </c:when>
    </c:choose>
</c:forEach>

现在,第一个和第二个特征应该并排出现,中间有一个分隔符“|”。我试着用float将这两个函数封装在单独的div中

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="horizonte-amazon-tags" prefix="hza"%>
<%@ taglib uri="aui" prefix="a"%>

<c:forEach var="feature" items="${view.subfeatureMap['featureList'].subfeatures}">
    <c:set var="featureName" value="${feature.featureName}" />
    <c:choose>
            <div style="float:left">
            <c:when test="${featureName eq 'first'}">
                    <jsp:include page="../first/common.jsp" />
            </c:when>
            <div>
            <span class="byLinePipe">|</span>
            <div>
            <c:when test="${featureName eq 'second'}">
                    <jsp:include page="../second/common.jsp" />
            </c:when>
            <div>
    </c:choose>
</c:forEach>

|

但这并没有产生我想要的产出。这是一个接一个地放置第一个和第二个功能。有人能指出我哪里出错了吗。

那么输出是什么?输出应该是第一个和第二个功能并排放置,中间有一个“|”。