level 1
♂温泉♀
楼主
Simple01.html
<form action="Simple01.jsp" method="post" ENCTYPE="multipart/form=data">
输入名称:<input type="text" name="ino"><br>
选择要上传的图片:
<input type="file" name="pic">
<input type="submit" value="上传">
</form>
----------------------------------------------------
Simple01.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<jsp:useBean id="smart" scope="page" class="com.jspsmart.upload.SmartUpload"/>
<%
smart.initialize(pageContext);
smart.upload();
smart.save("/upload");
%>
<%
String name = smart.getRequest().getParameter("ino");
%>
<h1><%=name%></h1>
------------------------------------------------------------------------
可是图片没有出现在文件夹里,而且取不到值,在Simple01.jsp中显示的是null。这是怎么回事儿,这个代码我看了很多遍了,应该没有问题,会不会是smartupload.jar有问题?
2011年07月14日 02点07分
1
<form action="Simple01.jsp" method="post" ENCTYPE="multipart/form=data">
输入名称:<input type="text" name="ino"><br>
选择要上传的图片:
<input type="file" name="pic">
<input type="submit" value="上传">
</form>
----------------------------------------------------
Simple01.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<jsp:useBean id="smart" scope="page" class="com.jspsmart.upload.SmartUpload"/>
<%
smart.initialize(pageContext);
smart.upload();
smart.save("/upload");
%>
<%
String name = smart.getRequest().getParameter("ino");
%>
<h1><%=name%></h1>
------------------------------------------------------------------------
可是图片没有出现在文件夹里,而且取不到值,在Simple01.jsp中显示的是null。这是怎么回事儿,这个代码我看了很多遍了,应该没有问题,会不会是smartupload.jar有问题?