|Re: Where do I need to put my "images" folder in Eclipse project? [message #942751 is a reply to message #942599]
||Sat, 13 October 2012 21:16
| Russell Bateman
Registered: July 2009
Location: Provo, Utah, USA
On 10/13/2012 11:38 AM, Dusan Cankovic wrote:|
> I have just started using eclipse for web development, so please help
> Where do I need to put my "images" folder in Eclipse project so that
> images appear when I run my html page?
> Example of html code:
> <img src="images/garagedoor.jpg" style="max-width:100%;
> max-height:100%;" id="slika" onclick="onClick_Pocetna()" />
> I have tried putting "images" folder in "MyProject/Web Content/" folder,
> where my html, css, js files are also located, in root of the whole
> project "MyProject/, in "Java Resources/src/" folder, and nothing worked
> so far.
> I tried changing the src of html to
> and that didn't work either.
> I am running my html page on Tomcat 6.0 server.
> Please help!
Posts on web development topics typically go into the Eclipse web tools
platform forum. I don't monitor that forum any more so I'll help from
here, but the guys in that forum are pretty good and pretty helpful.
WebContent/images/garagedoor.jpg is the correct location for something
to be accessed via <img src="images/garagedoor.jpg" />.
There must be something else awry. I hope you misspelled "Web Content"
in your question. If not, that may be a problem (there shouldn't be a
space). There are so many other things that could be wrong.
to see if there is an images subdirectory. This is where Eclipse
publishes your Dynamic Web Project for Tomcat to run.
Are you able to access anything else in your project when you run it?
That much wasn't too clear. If you're not getting any grunts at all out
of your project, your web.xml may be wrong.
Powered by FUDForum
. Page generated in 0.03446 seconds