
STRUTS2
咖喱姚
这个作者很懒,什么都没留下…
展开
-
Struts2中struts-default.xml、struts.xml 及struts.properties详解
1) struts-default.xml 这个文件是struts2框架默认加载的配置文件。它定义struts2一些核心的bean和拦截器。 "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">原创 2009-03-10 11:05:00 · 3506 阅读 · 1 评论 -
struts2 乱码
乱码产生的根源可能来自输入端、传送端或接收端,务必保证各过程的编码要一致:1)JSP JSP文件顶部加上 JSP文件head中加上 2)运用字符过滤器 3)在struts.properties中加入: struts.i18n.encoding=GBK原创 2009-03-25 15:18:00 · 577 阅读 · 0 评论 -
文件上传时异常Invalid field value for field "**"与enctype="multipart/form-data"
在做文件上传时,有一个form标签的属性必须要加上。 文件上传的form若如下面所写,则会报异常:Invalid field value for field "**",原因是:表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。默认情况,这个编码格式是application/x-www-form-urlencoded,不能用于文件上传原创 2009-04-13 13:33:00 · 15013 阅读 · 1 评论 -
struts2 字符截取
15"> ...原创 2009-04-29 17:18:00 · 688 阅读 · 1 评论 -
struts2 property标签访问 Java静态方法
在做页面开发过程中,有时需要在页面调用后台的静态方法,比如说常用的工具类、公用类等。这次尝试在struts2标签访问java静态方法,感觉很方便,也很清晰,和大家分享一下。 我需要给我的列表页面的字段进行长度截取,我在后写了一个工具类,专门用于截取字符串: public class SubStringUtil { public static String ss = "原创 2009-07-01 10:41:00 · 5048 阅读 · 0 评论