You can't inline a graphics object in a html page (at least not that
I've ever seen). The image has to be called on a separate request --
all you can do with the genimage.jsp is provide the path to the image
for download.
Now if you provided the url like this:
<img
src="/templates/site/paragraphs/tools/genimage.jsp?imgPath=/context/path/to/my/image&width=640&height=480"
/>
Then you might have something as the genimage.jsp would be able to find
the image using the imgPath request parameter and scale or whatever it
using the width and height request parameters.
--David
anthony rogers wrote:
more info-
i tryed doing this:
<jsp:text><![CDATA[<img src="]]></jsp:text><c:import
url="/templates/site/paragraphs/tools/genimage.jsp"
/><jsp:text><![CDATA[" />]]></jsp:text>
but i get an error of because my genimage.jsp calls:
response.setContentType("image/png");
OutputStream os = response.getOutputStream();
// output the image as png
ImageIO.write(buffer, "png", os);
os.close();
so to create the image; magnolia's import is very happy about that:
Caused by: java.lang.IllegalStateException: Unexpected internal
error during <import>: Target servlet called getWriter(), then
getOutputStream()
downer :(
aNt
anthony rogers wrote:
hello everyone :)
hope this is a simple one; i been playing with the new magnlia 3.x
(r) and was wondering is anyone can tell me how i can put a buffered
image (im making in jsp) into my templates image tag? so i can todo
something like this:
<img src="genimage.jsp" /> (maybe a node in the dialog points to the
jsp and i somehow pull it out into my page (dialogIncludes style)).
the above image tag points to another jsp that has the code that
makes the image. thing is i cant seem to get that to work in magnolia
because the way things work with the cool repositories and nodes. so
how do i get a jsp or the template to point to my image code?- just a
case of wiring things up differently i think...
any pointers would be rockin.
ta
aNt
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------