Instead of deploying the war file, deploy the expanded war. In other words, where now you have a file named jboss_home/server/default/deploy/test.war, instead, create a directory named jboss_home/server/default/deploy/test.war, and unpack you war file into that directory.
Then, have your code create your pie chart file in the jboss_home/server/default/deploy/test.war directory (or in some subdirectory). For example, if your code creates a pie chart in a file named chart.jpg within the test.war directory, you can access it via /chart.jg (or http://localhost:8080/test/chart.jpg).
Great ! Thanks for the response :)