// 绘制字符串
if (getParameter(request, "Action").equalsIgnoreCase("String")) {
Chart chart = new Chart(response, 200, Color.BLUE, Color.yellow, 3);
chart.setStr(getParameter(request, "str"));
return chart.drawChart();
}
// 绘制校验码
else if (getParameter(request, "Action").equalsIgnoreCase("randimg")) {
Chart chart = new Chart(response, 50, null, null, 3);
chart.setStrfont(new Font("Times New Roman", 0, 18));