It's not a secret anymore!
The moose likes Servlets and the fly likes Image in HTML content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Image in HTML content " Watch "Image in HTML content " New topic

Image in HTML content

Glories Moh

Joined: Dec 12, 2010
Posts: 6
Hi everybody,

I have servlet code that set content to HTML and print HTML tags

I have one problem with image , the image is not displayed even I set src attribute to the correct path

where I should place the image ? , I put it in the ROOT folder but the problem is not solved

note : I use local tomcat server

please help me

thanks in advance

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

If the image is not appearing, chances are that you have not used the correct URL path.

Please TellTheDetails. Without knowing what you set the path to, it's impossible to even guess how it might be incorrect.

[Asking smart questions] [About Bear] [Books by Bear]
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Could you post your code? It will help us to help you.

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
I agree. Here's the link:
subject: Image in HTML content
It's not a secret anymore!