I posted this same question just over a year ago, but I never received
any feedback on it. I've just continued to use the older 1.5 version
of Stripes, but it would be nice to upgrade to 1.5.6.
I've attempted to upgrade to 1.5.6, but I've found a few compatibility
issues. Maybe I've missed something in the release notes, but the
rendered output between 1.5 and 1.5.6 is significantly different at
times. I've isolated one test case of a .jsp page using a
layout-component tag within a Stripes form.
In 1.5.6, the <form> tag gets inserted twice at different positions,
specifically within the content of the layout-component I'm including
in view_test.jsp (it's just an eyebrow-type tab component).
I've included a stripped-down test case showing three .jsp sources
which were tested with 1.5 and 1.5.6, with no changes other than
switching stripes.jar, cos.jar, and commons-logging.jar.
Here's all the source along with the 1.5 and 1.5.6 renderings:
view_test.jsp:
<%@ include file="taglibs.jsp" %>
<s:layout-render name="/WEB-INF/layout/empty_test.jsp">
<s:layout-component name="contents">
<s:form beanclass="${actionBean.beanclass}">
<table>
<tr>
<td>
<s:layout-render name="/WEB-INF/layout/bodytab.jsp">
<s:layout-component name="caption">
Person Details
</s:layout-component>
</s:layout-render>
</td>
</tr>
</table>
</s:form>
</s:layout-component>
</s:layout-render>
empty_test.jsp:
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld"; %>
<s:layout-definition>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<title>Testing Stripes</title>
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/styles/main.css"/>
</head>
<body>
<s:layout-component name="contents"/>
</body>
</html>
</s:layout-definition>
bodytab.jsp:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../taglibs.jsp" %>
<s:layout-definition>
<table>
<tr>
<td class="eyebrow" nowrap>
<span class="eye1">
<s:layout-component name="caption"/>
</span>
</td>
</tr>
</table>
</s:layout-definition>
Rendered using Stripes 1.5 (correctly):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<title>Testing Stripes 1.5.6</title>
<link rel="stylesheet" type="text/css" href="/mcdir/styles/main.css"/>
</head>
<body>
<form action="/mcdir/person.html" method="post">
<table>
<tr>
<td>
<table>
<tr>
<td class="eyebrow" nowrap>
<span class="eye1">
Person Details
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="display: none;"><input type="hidden"
name="_sourcePage" value="/WEB-INF/view_test.jsp" /><input
type="hidden" name="__fp" value="HMxunf9BB/e5MMHxWAnF9g=="
/></div></form>
</body>
</html>
Rendered using Stripes 1.5.6 (bad since <form> and subsequent lines
are rendered twice):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<title>Testing Stripes</title>
<link rel="stylesheet" type="text/css" href="/mcdir/styles/main.css"/>
</head>
<body>
<form action="/mcdir/person.html" method="post">
<table>
<tr>
<td>
<table>
<tr>
<td class="eyebrow" nowrap>
<span class="eye1">
<form action="/mcdir/person.html" method="post">
<table>
<tr>
<td>
Person Details
</td>
</tr>
</table>
<div style="display: none;"><input type="hidden"
name="_sourcePage"
value="fa-eQC2JW4Y66Mtd6mdMB9Wsmm3BkZDBmrUbJBDNZec=" /><input
type="hidden" name="__fp" value="o8kS4J6bomI=" /></div></form>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="display: none;"><input type="hidden"
name="_sourcePage"
value="b_lH2wJnPiE66Mtd6mdMB9Wsmm3BkZDBmrUbJBDNZec=" /><input
type="hidden" name="__fp" value="p3VyqGVIeww=" /></div></form>
</body>
</html>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users