1 Reply Latest reply on Aug 19, 2002 3:26 PM by Mikael Eriksson

    struts, creating images on fly.

    null_pointer Newbie

      I have a struts application which is working fine.
      also i have a few image which are outside the server directory.
      at present i am just reading the contents from the image file and writting it back to the client.
      but i need to display both image and text.
      what the best way to do this using struts.

      i tried this
      where /search/display is mapped to the the structs action class in my struts-config.xml file
      but this is not working properly.
      but if i try "http://myapp/search/displayimages?id=1234" in the browser window it works fine and i get the image.


        • 1. Re: struts, creating images on fly.
          Mikael Eriksson Novice

          Use the html:img tag, I guess your image would be rendered by something like:

          <bean:define id="imageparam" value="1234" />
          <html:img page="/search/displayimage"
          paramId="id" paramName="imageparam" />

          The imageparam bean is needed to get the parameter to the image url. If you can make that in some other way that is probably better :-)

          Not sure about what you mean when you say that you must display text.