Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Image Handling in HTMLRenderOption to a custom directory location
shalu30aug
<p>Actually I am writing my own servlet to run and render reports..I have successfully done so but stuck to a point as such that before I was setting image directory as:</p><p> </p><p>htmlOptions.setBaseImageURL(sc.getContextPath()+"/images");</p><p>htmlOptions.setImageDirectory(sc.getRealPath("/images"));</p><p> </p><p>But my requirement is as such that my image directory should be "C:/Birtplatform/comp/images"....</p><p> </p><p>So wen I changed my Image Directory as above custom location...my image is not rendering.....Please help!!!!</p>
Find more posts tagged with
Comments
mwilliams
<p>Using these should work for testing from Eclipse. When you go to deploy, you should be able to change this to point to your image folder where it exists in your deployment. Hope this helps.</p><p> </p><p> </p><p>htmlOptions.setImageDirectory("C:/Birtplatform/comp/images");</p><p>htmlOptions.setBaseImageURL("file: /// C:/Birtplatform/comp/images");</p>
shalu30aug
<p>Ya,actually wen I was testing it from eclipse and was setting it ,it couldnt actually serving me the images though it was creating in the folder....finally I wrote my own servlet for handling images and finally reading the images from this folder using image id and writing in the output stream....as HTMLImageServerHandler getImage() does .</p>
mwilliams
<p>So, you've got everything working as needed now?</p>
shalu30aug
<p>yes finally I wrote the servlet completely and now my project is using the servlet to render reports.</p>
mwilliams
<p>Great to hear!</p>