我把css文件应用到我的jsp中确实有问题。
当我运行我的项目时,我可以看到当我在浏览器上检查我的页面时加载了css(网络 - > 200:OK)。但根据我的index.jsp
上的css指令,我看不到任何巫婆被应用的东西
提前谢谢。
1- index.jsp:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>adding d'un client</title>
<link type="text/css" rel="stylesheet" href="css/general.css" />
</head>
<body>
<div>
<form method="get" action="creationClient">
<fieldset>
<legend>Informations of client</legend>
<label for="nClient">name <span class="requis">*</span></label>
<input type="text" id="nClient" name="nClient" value="" size="20" maxlength="20" />
<br />
</fieldset>
<input type="submit" value="add" />
</form>
</div>
</body>
</html>
2- general.css
body, p, legend, label, input {
font: normal 8pt verdana, helvetica, sans-serif;
color:red;
}
fieldset {
padding: 100px;
border: 1px #111 solid;
margin: 10px;
}
legend {
font-weight: bold;
color: #0568CD;
}
form label {
float: left;
width: 200px;
margin: 3px 0px 0px 0px;
}
form input {
margin: 3px 3px 0px 0px;
border: 1px #999 solid;
}
form input.sansLabel {
margin-left: 200px;
}
.requis {
color: #c00;
}
.erreur {
color: #900;
}
.succes {
color: #090;
}
.info {
font-style: italic;
color: #E8A22B;
}
3-项目结构:
| ---&GT; PROJECT1
| ---&GT; CSS
| ---&GT; general.css
| ---&GT; META-INF
| ---&GT; WEB-INF
| ---&GT;的index.jsp
| ---&GT; web.xml中
Network inspecting.png
非常感谢。
更新1
3-项目结构:
| ---&GT;的WebContent
| ---&GT; CSS
| ---&GT; general.css
| ---&GT; META-INF
| ---&GT; WEB-INF
| ---&GT;的index.jsp
| ---&GT; web.xml中