0
<html>
<head>
<style type="text/css">

body {background-image:url("../images/liza.jpg");}      //---- this line

</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body >
...
...
...

in this code i dont know why i am unable to include this image in my jsp page ....

this is a jsp page designed in eclips juno

the directory structure is
--> myweblib
-->---- webcontent
-->--------- images
--> --------------liza.jpg
-->build

url while running this page in eclips

http://localhost:8081/MyWebLibrary/books.jsp

my jsp file is directly in side the webcontent folder ie: "webcontent/books.jpg" and my image is inside: "webcontent/images/liza.jpg"

4

2 回答 2

1

删除 ../ 您的图像部署在上下文中,而不是在主机根目录上

问候

于 2013-04-23T13:20:18.810 回答
0

去除 ”

CSS 不需要它们

于 2013-04-23T15:37:54.470 回答