• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

how to get an image by .css file using .ftl(freemarker template)

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot get any image files on the web page using the .ftl with .css file where specified the path of image as backgoung.

My directory structure of dynamic project is
<#macro page title>
<title>IPWS Administration - ${title?html}</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="WEB-INF/templates/default.css" media="screen" />
<!-- start header -->
<div id="header">
<div id="logo">
<h1>IPWS Administration</h1>
<p1>Ingram Digital Group</p1>
<!-- end header -->
<div id="footer">
<p>Ingram Digital Group  •  IPWS Administration  •  <a href="http://www.freecsstemplates.org/">Extended CSS Template</a></p>

#logo {
float: left;
height: 120px;
margin-left: 10px;
background: url("images/img01.jpg") no-repeat left center;

In default.css, I used backgound:url(images/img01.jpg)
Even though I tried to move \images\ directory into same level as WEB_INF directory, I was not seeing any images on the web browser. however, i was getting other css's nforamtion except the images. I don't understand why I cannot load any images.

Please adivse me to see the image on the web page.


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!