Philipp Otto

Greenhorn
+ Follow
since May 04, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philipp Otto

Thanks a lot.

I found a better solution to display the chart in the JSP without saving it.
With ...
ServletEncoderHelper.encodeJPEG13( axisChart, 1.0f, response );
I can directly put the Chart into the servlet response and then display it with a simple <img> tag within the JSP. That´s even better! :-)

Philipp
6 years ago
JSP
Hey there,

I want to export a chart, generated by JCharts, as a PNG- File to the file system of my web project, but can´t find the solution. I want to use a relative path and already tried almost every combination of paths. Here´s one of my tries:



The code is executed in a servlet in "Projectname/Java Ressources/src/servlets/File.java"

Which path do I have to use to save the Picture into my folder:

"ProjectName/WebContent/diagrams/"

Thanks for your help!

Philipp
6 years ago
JSP
Thanks for your fast answer Tim :-)

I will try it but will the image be in the filesystem forever or is it just temporary for this session maybe? I mean if a lot of users want to see charts then there would be so many files in the file system.

Philipp
Hey everybody,

i want to show simple charts in JSPs with the JCharts library.
I already know how to generate them in a Servlet.



So if I open this servlet directly it displays the chart in the correct way. I just want to generate the chart in the servlet and then add it to the JSP. But how do I do that? I mean I can´t use getProperty like if I want to get a string so how can I access the encoded chart within the JSP?

Thanks for your help.

Philipp