• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 with Open Free chart 2

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I m working with Java web application with struts 2 framework. I m having Java open free chart 2 sample source code, which is in servlet. Can any one help me to provide sample Open free chart 2 example using Struts2.

Or else Can any one tell me how to convert servlet to struts2 action file.
I m tried to convert the code to struts 2 action.

Here is the sample servlet code

private void showPie(HttpServletRequest request,
HttpServletResponse response) throws IOException {
System.out.println("TTTTTTTTTTTTTTEEEEEEEEEEEEEEEEETTTTTTTTTTTTTTTTTTTTT");
Chart chart = new Chart();
Title title = new Title();
title.setText("My name is Title");
title.setStyle("{colour:#DDDDDD;font-size: 15px;}");

Pie pie = new Pie();
pie.setAlpha(0.6);
pie.setAnimate(true);
pie.setBorder(6.0);
pie.setTip("hello");
pie.setValues(new Object[] { 21, 29, 15, 10, 13, 12 });
pie.setColours(new Object[] { "#225599", "#995522", "#3399cc",
"#cc9933", "#551188" });

chart.setPie(pie);
chart.setTitle(title);
chart.setBg_colour("#66DD33");
response.getWriter().write(chart.createChart());
}
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic