Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: Release 1.5.1
-
Fix Version/s: Release 1.5.4
-
Component/s: None
-
Labels:None
-
Environment:Windows Vista, Tomcat, Jdk 1.6
Description
The Jsp:
<stripes:layout-render name="/layout/testLayout.jsp" title="User Home" action="/userHome.action">
<stripes:layout-component name="contents">
<stripes:form action="/userHome.action" partial="true">
<stripes:file name="fileBean" />
<stripes:submit name="upload" value="upload"/>
</stripes:form>
</stripes:layout-component>
</stripes:layout-render>
The Layout:
<stripes:layout-definition>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
</head>
<body>
<stripes:form action="${action}">
<div>${contents}</div>
</stripes:form>
</body>
</html>
</stripes:layout-definition>
---------------------
fileBean is always null in action bean.
It works if I take away the <stripes:form> tag in the layout, and remove partial="true" in the jsp.
Issue Links
| Dependency | |||
|---|---|---|---|
|
|
|
||
I saw two "_sourcePage" hidden fields in the generated html. This could be the cause of the problem. I think this is also related to bug STS_672.
<form action="/CSIUser/userHome.action" method="post">
<div>
<form enctype="multipart/form-data" name="userHomeForm" action="/CSIUser/userHome.action" method="post">
<input name="fileBean" type="file" />
<input name="upload" value="upload" type="submit" />
<div style="display: none;">
<input type="hidden" name="_sourcePage" value="LA0Tyc3bYUwJDj1JmqNuE24xiSlmU_Id29300QhQp8Q=" />
<input type="hidden" name="__fp" value="0gZGESUOeXk=" /></div></form>
</div>
<div style="display: none;">
<input type="hidden" name="_sourcePage" value="gfUOHHnajR7kuDZDTvKJ0Lv0yBT2PidtxLAeU0DJM9A=" />
<input type="hidden" name="__fp" value="jXqEAZWUeUc=" />
</div>
</form>