//a.jsp
<html>
<head></head>
<body>
<form action = "up.action" method="post" enctype="multipart/form-data">
<iframe src='b.jsp'></iframe>
<input type="text" name="name"/>
<input type="submit" value="upload">
</form>
</body>
</html>
//b.jsp
<html>
<head></head>
<body>
<form target="_parent" action = "uploadfile.action" method="post" enctype="multipart/form-data">
<input type="file" name="file"/>
<input type="submit" value="submit">
</form>
</body>
</html>
在子页面中的表单中必须有上面标的红色的内容,不然action中的方法执行不了。