- 浏览: 244659 次
- 性别:
- 来自: 北京
最新评论
-
mavshuang:
D:\BIEE\instances\instance1\bin ...
Executing:opmnctl start coreapplication_obisch1 failure -
wv1124:
安装 cocoapods报错,替换国内源:ERROR: Co ...
ruby的gem和boundle安装解决办法 -
burkin:
如果first.jsp放在根目录下,也可以用<resul ...
struts2整合JFreeChart带热点的实例 -
woweipingzui:
强烈推荐,但是我在测试的时候,需要<package na ...
struts2整合JFreeChart带热点的实例 -
jintianhen1:
网上说用Class.forName("com.tim ...
TimesTen for Windows 使用指南(3) 远程客户端配置
文章列表
package com.cs.jfreechart;
import java.awt.Color;
import java.awt.Font;
import java.io.FileOutputStream;
import java.io.IOException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PiePlot;
impor ...
1.导入jar包:
struts2-jfreechart-plugin-2.1.8.1.jar
jfreechart-1.0.13.jar
jcommon-1.0.16.jar
2.Action:
package com.cs.struts2.helloworld;
import java.awt.Color;
import java.awt.Font;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.c ...
1.先建一个action:
<package name="yeeku" extends="struts-default" namespace="/images">
<action name="px">
<result>px</result>
</action>
</package>
2.再创建一个1*1的空白图片文件名为px且无后缀名,放到 ...
1)将iTextAsian.jar和iTextAsianCmaps.jar置于项目lib中。
2)将模板设计中的文本框的属性中,在font栏中做如下设置(所有文本框):
Font Name: 宋体(或其他如楷体)
Pdf font name:STSong-Light
Pdf encoding: UniGB-UCS2-H
Pdf Embeded: 打勾
做以上设置后就OK了 。
为了解决form提交到action中的中文参数乱码问题。
根据页面编码进行设置,如果所有页面使用UTF-8就使用UFT-8,如果GBK,就设置GBK。
1.在struts2-core-2.0.0-SNAPSHOT.jar包中路径为struts2-core-2.0.6\org\apache \struts2有一个default.properties 文件,把struts.i18n.encoding=UTF-8改为struts.i18n.encoding=GBK
2.在struts.properties文件中设置struts.i18n.encoding=GBK。
3.或者在struts.xml文件内 ...
当我们在表格的单元格中应用struts2中的s:checkbox控件时候,我们会发现,s:checkbox所在的单元格与本应是同行的其它单元格不再行上面,这是怎么回事呢,原因就是,当解析s:checkbox控件时候,默认会将控件解析成如下结构:
<tr>
<td></>
<td><input type="checkbox" ... .../><input type="hidden" ... ... /></td>
</tr>
而本身我们在外层已经写好了相应的&l ...
1.文件上传
upload.jsp
<body>
<span style="color:red"><s:property value="#request.typeError"/></span>
<span style="color:red"><s:property value="#request.sizeError"/></span>
<span style="color:red&quo ...
Office OneNote 2007 是一个数字笔记本,为人们提供一个用于收集他们的笔记与信息的位置、快速查找他们寻找内容的强大搜索功能和易用共享笔记本,以便他们可以管理信息负载并高效地协同工作。
与纸张式系统、字处理程序、电 ...
Batis的sqlMap配置文件的selectKey元素有个type属性,可以指定pre或者post表示前生成(pre) 还是后生成(post)。
1.Oracle
(1)往oralce里建一个sequence:
create sequence seq_id_petition
minvalue 1
start with 1
increment by 1
(2 ...
对于一对多或一对一的映射关系,在实体类里引用的是对象类型,而数据库里使用的是ID,这样就牵涉到OR映射问题。如:
实体类:
public class PetitionLetter {
private int id; //信访件ID
private String identifier; //信访件编号
private Reporter reporter; //举报人
private LetterInformation letterInformati ...
最近遇到sql语句在pl/sql里能查出数据,但直接放到ibatis配置文件里却查询结果为空,语句为:
select p.* from t_petitionletter p join t_processflow f on p.processflow = f.id where f.flowstate = '办理'
发现ibatis不支持直接在配置文件里写where子句,需要使用ibatis的动态where子句标签:
<select id="selectPetitionLetterForFlow" resultMap="PetitionLett ...
在做根据ID查询一个带有外键的主表类时,如果在映射文件方法里返回结果使用相应类,则会报此种错误:Cause: com.ibatis.sqlmap.client.SqlMapException: No type handler could be found to map the property 'reporter' to the column 'reporter'. One or both of the types, or the combination of types is not supported.
解决办法:使用resultMap。
错误代码:
<select id=& ...
对于有外键的主表映射,在查询返回结果时要使用resultmap进行映射,并在propety里使用select属性进行子查询。
public class PetitionLetter {
private int id;
private String identifier;
private Reporter reporter; //外键,数据库里是int类型
private LetterInformation letterInformation; ...
通过更改form里的action和隐藏input的method值。
function send(){
document.getElementById("method").value="processSend";
var s = document.getElementById("method").value;
document.form1.action = "<%=contextpath %>/jsp/process/banli.do";
document.fo ...
<table id="tblSort" width="100%" border="0" cellspacing="1" cellpadding="2"
align="center" bordercolordark="#DFDFFF" bordercolorlight="#003366"
bgcolor="#B3C4DB">
<thead>
<tr c ...