struts
共 2 篇文章
struts json 引号 " 问题
在使用json从后台传递数据到前台时,如果是这样的: 后台向页面发送一个消息,后台写法: String str="{"rows":[{"info":"系统中已有该工号"}]}"; request.setAttribute("MessageInfo",str); 前台jsp页面中获取写法 result="<%=request.getAttribute("MessageInfo")%>"; 或者 result="<bean:write name="MessageInfo"/>"; 那么前台获取的值就是: {"rows":[{"info":"系统中已有该工号"}]} 而我们想要的是 {"rows"…
2009-02-12 17:22 · struts · Struts · json · JSP · Bean
用<html:file/> 文件上传功能实例和JSP Commons FileUpload 实例
struts_file.rar 工程见附件。 说明: 1、工程为Eclipse 3.2,tomcate 5.5,JDK1.5; 2、在myeclipse struts config editor 里面是无法在Design添加formbean的,只能在Source中写入formbean; 3、上传的文件路径在WebRoot下。 4、Struts Configuration 1.2 补充JSP Commons FileUpload 组件上传文件实例FileUpload.rar,并对比上传效率。 FileUpload.rar工程见附件。 说明: 1、工程为Eclipse 3.2,tomcate 5…
2008-12-23 13:19 · struts · HTML · Myeclipse · Eclipse · Struts · JSP