使用smartupload时表单如何取值? smartupload sl=new smartupload();sl.getrequest().getParameter("name");这样就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 楼上说得没有错!sl.getrequest()得到的值就是jsp中request.这样smartupload 和jsp 就可以沟通了。 问题解决,结贴但还要补充的是smartUpload需要初始化,我又查了很多文章才搞定的,方便一下后来人吧!在页面中的初始化时:SmartUpload sl = new SmartUpload();sl.initialize(pageContext);sl.upload();sl.getrequest().getParameter("name");在servlet中初始化时:public class user extends HttpServlet {private ServletConfig config; /** * Init the servlet */ final public void init(ServletConfig config) throws ServletException { this.config = config; } final public ServletConfig getServletConfig() { return config; } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ SmartUpload sl = new SmartUpload(); sl.initialize(config,request,response); try { sl.upload(); } catch (ServletException ex) { } catch (IOException ex) { } catch (SmartUploadException ex) { }sl.getrequest().getParameter("name"); }}在servlet中初始化不知道能不能简化,不过最少我能运行了! 100分求一个用户注册MD5加密存放进数据库,登陆判断的例子! 请问如何用 java 调用C++写的webService, 急急....... 有谁做过任务派发系统吗 求在STRUTS中导出CSV格式的方法 密码验证时的随即图片生成是怎么实现的? Tomact设置问题 怎样从html到jsp中传参数?两个问题120分! 怎样返回数据库中数据条数 关于字符串分割!高手请进! 如何实现JSP页面、代码的复用? 为什么<input type="file" name="textfield" value="c:\aaa.zip">默认值显示不出来 100分求jsp动态查询并显示数据!!!
但还要补充的是smartUpload需要初始化,我又查了很多文章才搞定的,方便一下后来人吧!在页面中的初始化时:
SmartUpload sl = new SmartUpload();
sl.initialize(pageContext);
sl.upload();
sl.getrequest().getParameter("name");在servlet中初始化时:
public class user extends HttpServlet {
private ServletConfig config;
/**
* Init the servlet
*/
final public void init(ServletConfig config) throws ServletException
{
this.config = config;
}
final public ServletConfig getServletConfig()
{
return config;
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
SmartUpload sl = new SmartUpload();
sl.initialize(config,request,response);
try {
sl.upload();
}
catch (ServletException ex) {
}
catch (IOException ex) {
}
catch (SmartUploadException ex) {
}
sl.getrequest().getParameter("name");
}
}
在servlet中初始化不知道能不能简化,不过最少我能运行了!