Discussions

Web tier: servlets, JSP, Web frameworks: Image inside servlet

  1. Image inside servlet (3 messages)

    How can you show a image from a servlet on to HTML page? I tried to use it but doesnt show image.. If I am testing the servlet with servlet runner or webserver should I keep the image in the same file?

    Threaded Messages (3)

  2. Image inside servlet[ Go to top ]

    Provide your code to fix the problem.
  3. Image inside servlet[ Go to top ]

    Put the image in the context root i.e. the root directory of the application under which the servlet is deployed.
  4. Image inside servlet[ Go to top ]

    yes code would really help...

    i have a servlet that shows images from a DB. in my html, i just put

    <img src="/servet/photoview?id=333">

    or something like that. works fine for me!