第一步:
我们在struts-config.xml里:
<action-mappings >
<action
attribute="logForm"
input="/form/log.jsp"
name="logForm"
path="/log"
scope="request"
type="com.yourcompany.struts.action.LogAction"
validate="true"
<forward name="s" path="/form/MyJsp.jsp" />
</action> 里面必须加上va ...
第一步:
在jsp页面中,注意负责上传文件的控件要使用html:file标签,在html:form处注意加上enctype=“multipart/form-data” method为post
1、
<html:form method="post" action="/save_user" enctype="multipart/form-data" >
2、
<tr>
<td>头像:</td>
<td><html:file property="image" /></td>
</tr>
第二步:
...
第一步:
首先将jspSmartUpload.jar包文件放到项目中/WEBROOT/WEB-INF/lib/下,将包文件放到tomcat安装目录中的/lib/下,jsp表单中form一定要是post提交方式。
第二步:(理清思路)
新建一个jsp页面,注意该页面上将采用JavaScript动态控制要上传的文件数量,同时注意表单的enctype属性值要设定为:“multipart/form-data”,表单提交后,交由相应的servlet处理或者是Action处理。Servlet和Action会调用jspSmartUpload组件实现文件的上传下载。
第三步:(编写jsp页面)
...
FCKeditor在线编辑器
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功
FCKeditor官司方网址:http://www.fckeditor.net/
FCKeditor在线DEMO:http://www.fckeditor.net/demo
FCKeditor下载直址:http://www.fckeditor.net/download 最新版已经是2.6了。
在项目中使用FCKeditor在线编辑器:
(1) 新建一个WEB工程;
(2) 解压FCKeditor_2.6.zip包,将其中的editor文件夹复制到项目中 ...
- 浏览: 991 次
- 性别:

- 来自: 深圳

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
FCKeditor在线编辑器
将数据库字符串的数据格式设置为UTF-8 并在配置文件里也将其设置为UTF-8
-- by qwunkee -
FCKeditor在线编辑器
一般都会上传中文图片,但2.3不支持中文,不知道2.4支持了没有哈, 所以需要 ...
-- by ssevening -
表单验证:使用struts中的 ...
在我们的项目里面没有使用这个框架, 太复杂。
-- by hotdog -
FCKeditor在线编辑器
能 具体点吗》?
-- by liukaiyi -
表单验证:使用struts中的 ...
应该是Struts1.x的validator框架吧这个框架在使用上有一点的局限: ...
-- by XmKevinChen






评论排行榜