用的框架是;SSH
 Struts1的,不明白怎么会这样,请指教。
 JSP部分代码:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>手机销量排行榜</title>
<link href="<%=request.getContextPath()%>/producttop/css/style.css" rel="stylesheet" type="text/css" />
  </head>

解决方案 »

  1.   

    你确定 producttop 这个文件夹在工程的 Web-Root 下面吗?
      

  2.   

    确认<%=request.getContextPath()%>/producttop/css/style.css,这样还能打开。。
      

  3.   

    <%=request.getContextPath()%>/producttop/css/style.css确认这个路径对吗?
    另外,代码不全,看不出是否出现了覆盖的情况.最大的原因是引入不对
      

  4.   

    <link href="<%=request.getContextPath()%>/producttop/css/style.css" rel="stylesheet" type="text/css"></link>
    试试这样写吧,你<link href=" 后面有个空格吧
      

  5.   

    小弟刚看到,我觉的链接地址改成这样试试: <%=basePath%>/producttop/css/style.css
    或者是去掉
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">