webwork项目开发小结1
webwork项目开发总结1
使用java开发已经快两年了,但一直没有做纯b/s开发,基本上还是采用c/s的思想开发的,界面基本上都是用applet做的,既不美观也,也不安全很是不好,因此前段时间做一个web短信办公软件是下定决心采用纯b/s开发,有余对将j2ee开发了解甚少,为了简单采用webwrok框架,表现层采用webwrok自带的标签库,数据访问层,采用spring的jdbc,开发工具采用eclipse+wtp,现将开发中遇到的问题予以总结:
1.web容器的选择
我一直采用tomcat-5.0.19,结果发现出现一些莫名奇妙的问题,无法解决,于是我换为jboss4,编译运行都没有问题,就是它的缓存让人受不了,不知怎么取消,我每次删除jboss的临时文件才可以,很是讨厌,最后换为tomcat-5.5.17,一切Ok.
2.中文乱码问题,更改一下内容
1).tomcat的server.xml中Connector加URIEncoding="GBK"
2).webwork的webwork.properties中加webwork.locale=zh_CN 和webwork.i18n.encoding=GBK
3).jsp中加<%@ page language="java" contentType="text/html; charset=GB2312"
pageEncoding="GB2312"%>和<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
3.datepicker标签无法显示问题,在web.xml添加一下内容
<filter>
<filter-name>webwork</filter-name>
<filter-class>com.opensymphony.webwork.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>/webwork/*</url-pattern>
</filter-mapping>
4.webwrok标签排版问题,webwork默认采用Xhtml主题,这样会给每个标签自动添加一个<tr>来排版,很多情况下不需要,其实只要把主题改为simple就可以了,示例如:<ww:datepicker cssStyle="width:160px;" format="%Y-%m-%d %H:%M" theme="simple"/>
先写这么多以后再写
使用java开发已经快两年了,但一直没有做纯b/s开发,基本上还是采用c/s的思想开发的,界面基本上都是用applet做的,既不美观也,也不安全很是不好,因此前段时间做一个web短信办公软件是下定决心采用纯b/s开发,有余对将j2ee开发了解甚少,为了简单采用webwrok框架,表现层采用webwrok自带的标签库,数据访问层,采用spring的jdbc,开发工具采用eclipse+wtp,现将开发中遇到的问题予以总结:
1.web容器的选择
我一直采用tomcat-5.0.19,结果发现出现一些莫名奇妙的问题,无法解决,于是我换为jboss4,编译运行都没有问题,就是它的缓存让人受不了,不知怎么取消,我每次删除jboss的临时文件才可以,很是讨厌,最后换为tomcat-5.5.17,一切Ok.
2.中文乱码问题,更改一下内容
1).tomcat的server.xml中Connector加URIEncoding="GBK"
2).webwork的webwork.properties中加webwork.locale=zh_CN 和webwork.i18n.encoding=GBK
3).jsp中加<%@ page language="java" contentType="text/html; charset=GB2312"
pageEncoding="GB2312"%>和<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
3.datepicker标签无法显示问题,在web.xml添加一下内容
<filter>
<filter-name>webwork</filter-name>
<filter-class>com.opensymphony.webwork.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>/webwork/*</url-pattern>
</filter-mapping>
4.webwrok标签排版问题,webwork默认采用Xhtml主题,这样会给每个标签自动添加一个<tr>来排版,很多情况下不需要,其实只要把主题改为simple就可以了,示例如:<ww:datepicker cssStyle="width:160px;" format="%Y-%m-%d %H:%M" theme="simple"/>
先写这么多以后再写
1 楼
zinking
2007-04-06
过于简单,我觉得总结太少了,呵呵