Hello, I'm using a servlet to render a PNG image directly for <img> tags within a JSP file. Our code is similar to the example in the URL below. We use 'ChartUtilities.writeChartAsPNG' to generate and return the image.
http://www.avajava.com/tutorials/lesson ... rvlet.html
My issue is that it seems that the servlet is invoked twice for each image when invoke from a browser. This is contributing to slower performance as only one request is really needed. Can someone provide insight into why this is occurring and how we can correct this to one servlet request per image? Thanks.
Tri
Servlet Invoked Multiple Times For Each Request
Re: Servlet Invoked Multiple Times For Each Request
This is off-topic, as JFreeChart is definitely not the component, triggering any Servlet request.
The example you linked to, looks good for me.
My guess is, that the HTML/JSP-page is somehow triggering the double request. What, if you enter the Image-URL in the browser? Does it still fire two requests? I bet not.
hth,
- martin
The example you linked to, looks good for me.
My guess is, that the HTML/JSP-page is somehow triggering the double request. What, if you enter the Image-URL in the browser? Does it still fire two requests? I bet not.
hth,
- martin