#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Posts
    2
    Rep Power
    0

    Question using servlets for creating images


    hello,

    I am new to jsp and servlets.....and i want to make graphs using the data available from the server side.......i don't know how to start????..please provide me guidelines or suggestions...how to start with the same?????.....thanx in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    34
    Rep Power
    14

    Possible Solution


    I'm thinking here, bear with:

    You might try an HTML web page that posts to a JSP backend that records data coordinates to a MySQL database. The fancy way of making a graph: allow a Flash .swf file access to the MySQL database, parse the coordinates, and make a graph. You can also make it more complex if needed. If you want, I can research this further and develop this for you if you want; I'll do this for $150. If not, I can continue to give you advice as you need it for free. Thanks for your time.

    Devin Hendricks
    sitesuwant@sitesuwant.com
    www.sitesuwant.com
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    Pittsburgh, PA
    Posts
    3
    Rep Power
    0
    How about using SVG? Here's more info:
    SVG
  6. #4
  7. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  8. #5
  9. No Profile Picture
    Java Developer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Posts
    5
    Rep Power
    0
    Have you tried creating an AWT of Swing image then using a GIFEncoder(there are a couple of freeware ones available) to write it directly to the output stream (being sure to set the content type to "image/gif" ?

    I did this a while ago, and it didn't seem too tricky
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Posts
    0
    Rep Power
    0
    Another way is to launch an external process that generates image files, write the dataset & other information into its standard input, then pick up the stream of bytes at its standard output and output them with content type "image/gif" or "image/png".
    Read up on java.lang.Process and java.lang.Runtime on how to use system processes.
    There are a number of image-rendering packages available, e.g. Gnuplot, Ploticus.

IMN logo majestic logo threadwatch logo seochat tools logo