61,115
社区成员
发帖
与我相关
我的任务
分享
<head runat="server">
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<title>***</title>
<link href="../css/alogin.css" rel="stylesheet" type="text/css" charset="utf-8"/>
</head>
body{
margin: 0;
padding: 0;
font-size: 12px;
background: #214D90 url(../images/login/bg.gif) repeat-x;
color: #999999;
font-family:"microsoft yahei","tahoma","arial",'宋体'; }
input{
font-family:"microsoft yahei","tahoma","arial",'宋体'; }
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
<title>***</title>
<link href="${ctx}/css/css.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/css/main.css" type="text/css" rel="stylesheet" />
原来我是这么写的,<c:set />标签没有声明
后来我在前面加了一句
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
但是还是不行!!!!!!
所以最后所有的${ctx}都被我改成${pageContext.request.contextPath}了
至于为什么之前那个不行没找到原因,但是还好现在显示出来了- -