jspsmartUpload 不能获取表单的的其他参数 5
表单的是这样的<formaction="uploadIMG.jsp"method="post"enctype="multipart/form-data"name="for...
表单的是这样的
<form action="uploadIMG.jsp" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input type="file" name="Test" />
<input type="text" value="tvalue" name="ss"/>
<input type="submit" value="上传"/>
</form>
uploadIMG.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,com.jspsmart.upload.*" errorPage="" %>
<%
request.setCharacterEncoding("GBK");
SmartUpload su=new SmartUpload();
out.print("sun="+su.getRequest().getParameter("sun"));
su.initialize(pageContext);
su.setMaxFileSize(1000000000);
out.println(“参数="+ su.getRequest ().getParameter("ss");
+"<BR><BR>");
%>
结果:
参数=null
为什么不是tvalue呀 展开
<form action="uploadIMG.jsp" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input type="file" name="Test" />
<input type="text" value="tvalue" name="ss"/>
<input type="submit" value="上传"/>
</form>
uploadIMG.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,com.jspsmart.upload.*" errorPage="" %>
<%
request.setCharacterEncoding("GBK");
SmartUpload su=new SmartUpload();
out.print("sun="+su.getRequest().getParameter("sun"));
su.initialize(pageContext);
su.setMaxFileSize(1000000000);
out.println(“参数="+ su.getRequest ().getParameter("ss");
+"<BR><BR>");
%>
结果:
参数=null
为什么不是tvalue呀 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询