我正在使用 css 和 jsp 制作一个(基本)网站。但是,由于某种原因,我无法让这个非常简单的 css 与我的 jsp 页面一起使用。
这是css的代码:
<style type="text/css">
body {background-color:#6495ed;}
</style>
这是我的jsp页面:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="blue.css">
<title>Hello ${user}</title>
</head>
<body>
<center><h2>Welcome to the Admin Panel ${user}</h2></center>
<form action="verifyredirect" method="POST">
<input type="submit" value="Verify User" name="submit" />
</form>
<form action="removeredirect" method="POST">
<input type="submit" value="Remove User" name="submit" />
</form>
<form action="banredirect" method="POST">
<input type="submit" value="Ban User" name="submit" />
</form>
<form action="unbanredirect" method="POST">
<input type="submit" value="Unban User" name="submit" />
</form>
<form action="changeroleredirect" method="POST">
<input type="submit" value="Change User Role" name="submit" />
</form>
<form action="changepasswordredirect" method="POST">
<input type="submit" value="Change User's Password" name="submit" />
</form>
<form action="viewrequestsredirect" method="POST">
<input type="submit" value="View User Requests" name="submit" />
</form>
<a href="logout">Log Out</a>
</body>
</html>
一切都在正确的目录中。任何人都可以指出代码的任何问题或帮助我解决问题吗?干杯