jspSmartUpload有什么方法可以获得表单的元素啊? com.jspsmart.upload.Request req=new com.jspsmart.upload.Request();String aa=req.getParameter("address");怎么不好使呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 顺便问下搂住的SmartUpload 是从哪下的阿? test.jsp<%@ page contentType="text/html; charset=GBK" %><html><head><title>test</title></head><body bgcolor="#ffffff"><form method="post" action="testupload.jsp" enctype="multipart/form-data">Name:<input type="text" name="name"><br>age:<input type="text" name="age"><br>file:<input type="file" name="upfile"><br><input type="submit" name="submit" value="UpLoad"></form></body></html>testupload.jsp<%@ page contentType="text/html; charset=GBK" %><%@ page import="java.sql.*"%><%request.setCharacterEncoding("GBK");%><jsp:useBean id="conn" scope="page" class="kysw.Conn"/><%@ page import="com.jspsmart.upload.*"%><%SmartUpload su=new SmartUpload();String name=su.getRequest().getParameter("name");String age=su.getRequest().getParameter("age");out.println(name);out.println(age);%>怎么输出null null 呢? 用getRequest().getParameter("name")应该能得到值的,如果为空的话,那你在初始化一下吧! SmartUpload su=new SmartUpload();su.initialize(pageContext);su.upload();String name=su.getRequest().getParameter("name");String age=su.getRequest().getParameter("age"); <%com.jspsmart.upload.SmartUpload mySmartUpload=new com.jspsmart.upload.SmartUpload();mySmartUpload.initialize(pageContext);mySmartUpload.upload();for(int i=0;i<mySmartUpload.getFiles().getCount();i++){ com.jspsmart.upload.File myFile=mySmartUpload.getFiles().getFile(i);}if(!myFile.isMissing()){ out.println("文件");}else{ out.println("元素");}%>为什么出现错误了呢?"testupload.jsp": Error #: 300 : variable myFile not found in class testupload_0002ejsp_jsp at line 13 struts2 jquery 上传文件 showModelessDialog问题 java web start运行错误 高分请高手进来帮忙啊:JSP程序在win2000中调试无错,在linux(RHEL)中出错 一个用sprint struts hibernate+c3p0 mysql token防重复提交 ajax 技术构建的网站 渴望 处理ORACLE9i中CLOB字段出错。。。 本人现在急需 jsp/java wap程序 谁有者本人愿意交换或购买! 来者有分! 请教 webwork 的 checkbox 如何在页面提交之后还保存状态啊 帮个忙哦 刚才有个问题说错了哦 jsp简单问题
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
test
</title>
</head>
<body bgcolor="#ffffff">
<form method="post" action="testupload.jsp" enctype="multipart/form-data">
Name:<input type="text" name="name"><br>
age:<input type="text" name="age"><br>
file:<input type="file" name="upfile"><br>
<input type="submit" name="submit" value="UpLoad">
</form>
</body>
</html>
testupload.jsp
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*"%>
<%request.setCharacterEncoding("GBK");%>
<jsp:useBean id="conn" scope="page" class="kysw.Conn"/>
<%@ page import="com.jspsmart.upload.*"%>
<%
SmartUpload su=new SmartUpload();
String name=su.getRequest().getParameter("name");
String age=su.getRequest().getParameter("age");
out.println(name);
out.println(age);
%>
怎么输出null null 呢?
su.initialize(pageContext);
su.upload();
String name=su.getRequest().getParameter("name");
String age=su.getRequest().getParameter("age");
com.jspsmart.upload.SmartUpload mySmartUpload=new com.jspsmart.upload.SmartUpload();
mySmartUpload.initialize(pageContext);
mySmartUpload.upload();
for(int i=0;i<mySmartUpload.getFiles().getCount();i++){
com.jspsmart.upload.File myFile=mySmartUpload.getFiles().getFile(i);
}
if(!myFile.isMissing()){
out.println("文件");
}else{
out.println("元素");
}
%>
为什么出现错误了呢?
"testupload.jsp": Error #: 300 : variable myFile not found in class testupload_0002ejsp_jsp at line 13