求助!!!浏览器清楚缓存后出现的问题样式全都加载不出来
有人能解决不,开始没啥事,只是说js有个Uncaught SyntaxError: Unexpected token <的错误,然后我百度后说是浏览器缓存,然后清楚缓存之后样式都加载成了html的格式。。。。。 服务器配置有问题
检查项目静态文件路径 配置的环境 不缓存最好在F12中network中勾选Disable cache
你这个情况应该是以前配置文件是对的 等项目加载这些静态文件的时候有缓存 后来改了配置 等清除了缓存以后 静态文件找到不到了所以报错 还有检查拟引入时是不是Mime类型成了text/Html 爱吾爱 发表于 2019-12-25 15:16
检查项目静态文件路径 配置的环境 不缓存最好在F12中network中勾选Disable cache
你这个情 ...
对的Mime变成了text/html,那这个问题怎么解决呢 Fris 发表于 2019-12-25 15:14
服务器配置有问题
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>Archetype Created Web Application</display-name>
<error-page>
<error-code>404</error-code>
<location>/admin/404.html</location>
</error-page>
<!-- <error-page>
<error-code>500</error-code>
<location>/admin/500.jsp</location>
</error-page>-->
</web-app>
这是我的web.xml配置 yangwulang 发表于 2019-12-25 16:04
对的Mime变成了text/html,那这个问题怎么解决呢
查看相关配置 首先查看页面引入时type类型是否正确 如果正确 检查web拦截配置 你这个啥也没发我猜不到啊兄弟 爱吾爱 发表于 2019-12-25 16:14
查看相关配置 首先查看页面引入时type类型是否正确 如果正确 检查web拦截配置 你这个啥也没 ...
没有设置拦截器,浏览器提示response头为Content-Type: text/html;charset=UTF-8,request头为Accept: text/css,*/*;q=0.1
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>Archetype Created Web Application</display-name>
<error-page>
<error-code>404</error-code>
<location>/admin/404.html</location>
</error-page>
<!-- <error-page>
<error-code>500</error-code>
<location>/admin/500.jsp</location>
</error-page>-->
</web-app>
web.xml没有配置此类有关于问题的东西,
serlvet我都是用的注解,都没有设置 response.setContentType("text/html;charset=utf-8"); 爱吾爱 发表于 2019-12-25 16:14
查看相关配置 首先查看页面引入时type类型是否正确 如果正确 检查web拦截配置 你这个啥也没 ...
<%--<%@ page import="com.yangwulang.pojo.User" %>--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zxx" class="no-js">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="./index/img/fav.png">
<meta name="author" content="codepixer">
<meta name="description" content="">
<meta name="keywords" content="">
<meta charset="UTF-8">
<title>网上书城</title>
<link type="text/css">
<link type="text/css" href="./index/css/linearicons.css">
<link type="text/css" rel="stylesheet" href="./index/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="./index/css/bootstrap.css">
<link type="text/css" rel="stylesheet" href="./index/css/magnific-popup.css">
<link type="text/css" rel="stylesheet" href="./index/css/nice-select.css">
<link type="text/css" rel="stylesheet" href="./index/css/animate.min.css">
<link type="text/css" rel="stylesheet" href="./index/css/owl.carousel.css">
<link type="text/css" rel="stylesheet" href="./index/css/main.css">
</head>
<body>
<%@include file="head.jsp"%>
<section class="banner-area" id="home">
<div class="container">
<div class="row fullscreen d-flex align-items-center justify-content-start">
<div class="banner-content col-lg-7">
<h5 class="text-white text-uppercase">公告: </h5>
<h1 class="text-uppercase">
${requestScope.notice.title}
</h1>
<p class="text-white pt-20 pb-20">
${requestScope.notice.body}
</p>
<a href="${pageContext.request.contextPath}/searchAll" class="primary-btn text-uppercase">进入商品列表</a>
</div>
<div class="col-lg-5 banner-right">
<img class="img-fluid" src="./index/img/header-img.png" alt="">
</div>
</div>
</div>
</section>
<!-- End banner Area -->
<!-- Start about Area -->
<section class="section-gap info-area" id="about">
<div class="container">
<div class="single-info row mt-40 align-items-center">
<div class="col-lg-6 col-md-12 text-center no-padding info-left">
<div class="info-thumb">
<img src="./index/img/about-img.jpg" class="img-fluid info-img" alt="">
</div>
</div>
<div class="col-lg-6 col-md-12 no-padding info-rigth">
<div class="info-content">
<h2 class="pb-30">Dr. Travor James</h2>
<p>
inappropriate behavior is often laughed off as “boys will be boys,” women face higher conduct
standards – especially in the workplace. That’s why it’s crucial that, as women.
</p>
<br>
<p>
inappropriate behavior is often laughed off as “boys will be boys,” women face higher conduct
standards – especially in the workplace. That’s why it’s crucial that, as women. inappropriate
behavior is often laughed off as “boys will be boys,” women face higher conduct standards –
especially in the workplace. That’s why it’s crucial that, as women.
</p>
<br>
<img src="./index/img/signature.png" alt="">
</div>
</div>
</div>
</div>
</section>
<!-- End about Area -->
<!-- Start fact Area -->
<section class="fact-area relative section-gap" id="fact">
<div class="overlay overlay-bg"></div>
<div class="container">
<div class="row d-flex justify-content-center">
<div class="menu-content pb-40 col-lg-8">
<div class="title text-center">
<h1 class="mb-10">Some Features that Made us Unique</h1>
<p>Who are in extremely love with eco friendly system.</p>
</div>
</div>
</div>
</div>
</section>
<!-- End fact Area -->
<!-- Start counter Area -->
<section class="counter-area">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="single-counter">
<h1 class="counter">2536</h1>
<p>Happy Clients</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="single-counter">
<h1 class="counter">6784</h1>
<p>Total Projects</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="single-counter">
<h1 class="counter">1059</h1>
<p>Cups Coffee</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="single-counter">
<h1 class="counter">12239</h1>
<p>Tickets Submitted</p>
</div>
</div>
</div>
</div>
</section>
<!-- end counter Area -->
<!-- Start price Area -->
<section class="price-area section-gap" id="price">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="menu-content pb-60 col-lg-8">
<div class="title text-center">
<h1 class="mb-10">Purchase whatever you want</h1>
<p>Who are in extremely love with eco friendly system.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="single-price no-padding">
<div class="price-top">
<h4>PDF</h4>
</div>
<p>
Who are in extremely love with <br>
eco friendly system.
</p>
<div class="price-bottom">
<h1><span>$</span> 79.99</h1>
<a href="#" class="primary-btn header-btn">Purchase Now</a>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="single-price no-padding">
<div class="price-top">
<h4>E-Book</h4>
</div>
<p>
Who are in extremely love with <br>
eco friendly system.
</p>
<div class="price-bottom">
<h1><span>$</span> 99.99</h1>
<a href="#" class="primary-btn header-btn">Purchase Now</a>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="single-price no-padding">
<div class="price-top">
<h4>Print Copy</h4>
</div>
<p>
Who are in extremely love with <br>
eco friendly system.
</p>
<div class="price-bottom">
<h1><span>$</span> 59.99</h1>
<a href="#" class="primary-btn">Purchase Now</a>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="tlinks">Collect from</div>
<!-- End price Area -->
<!-- Start course Area -->
<section class="course-area section-gap" id="course">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="menu-content pb-60 col-lg-9">
<div class="title text-center">
<h1 class="mb-10">Top Courses That are open for Students</h1>
<p>Who are in extremely love with eco friendly system.</p>
</div>
</div>
</div>
<div class="row">
<div class="active-course-carusel">
<div class="single-course item">
<img class="img-fluid" src="./index/img/c1.jpg" alt="">
<p class="sale-btn">For Sale</p>
<div class="details">
<a href="#"><h4>Breakthrough Thinking <span class="price float-right">$25</span></h4></a>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna
</p>
</div>
</div>
<div class="single-course item">
<img class="img-fluid" src="./index/img/c2.jpg" alt="">
<p class="sale-btn">For Sale</p>
<div class="details">
<a href="#"><h4>Breakthrough Thinking <span class="price float-right">$25</span></h4></a>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna
</p>
</div>
</div>
<div class="single-course item">
<img class="img-fluid" src="./index/img/c3.jpg" alt="">
<p class="sale-btn">For Sale</p>
<div class="details">
<a href="#"><h4>Breakthrough Thinking <span class="price float-right">$25</span></h4></a>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="tlinks">Collect from </div>
<!-- End course Area -->
<!-- Start call-to-action Area -->
<section class="call-to-action-area section-gap">
<div class="container">
<div class="row justify-content-center top">
<div class="col-lg-12">
<h1 class="text-white text-center">Download Our App for all Platforms</h1>
<p class="text-white text-center mt-30">
It won’t be a bigger problem to find one video game lover in your neighbor. Since the introduction
of Virtual Game, it has been achieving great heights so far as its popularity and technological
advancement are concerned.
</p>
</div>
</div>
<div class="row justify-content-center d-flex">
<div class="download-button d-flex flex-row justify-content-center mt-30">
<div class="buttons flex-row d-flex">
<i class="fa fa-apple" aria-hidden="true"></i>
<div class="desc">
<a href="#">
<p>
<span>Available</span> <br>
on App Store
</p>
</a>
</div>
</div>
<div class="buttons flex-row d-flex">
<i class="fa fa-android" aria-hidden="true"></i>
<div class="desc">
<a href="#">
<p>
<span>Available</span> <br>
on Play Store
</p>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- End call-to-action Area -->
<!-- Start testomial Area -->
<section class="testomial-area section-gap">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="menu-content pb-60 col-lg-8">
<div class="title text-center">
<h1 class="mb-10">What our Reader’s Say about us</h1>
<p>Who are in extremely love with eco friendly system.</p>
</div>
</div>
</div>
<div class="row">
<div class="active-tstimonial-carusel">
<div class="single-testimonial item">
<img class="mx-auto" src="./index/img/t1.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="./index/img/t2.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="img/t3.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="img/t1.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="img/t2.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="img/t3.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="img/t1.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="./index/img/t2.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
<div class="single-testimonial item">
<img class="mx-auto" src="./index/img/t3.png" alt="">
<p class="desc">
Accessories Here you can find the best computer accessory for your laptop, monitor, printer,
scanner, speaker, projector, hardware and more. laptop accessory
</p>
<h4>Mark Alviro Wiens</h4>
<p>
CEO at Google
</p>
</div>
</div>
</div>
</div>
</section>
<!-- End testomial Area -->
<!-- start footer Area -->
<footer class="footer-area section-gap">
<div class="container">
<div class="row">
<div class="col-lg-5 col-md-6 col-sm-6">
<div class="single-footer-widget">
<h6>About Us</h6>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore dolore magna aliqua.
</p>
<p class="footer-text">
Copyright ©<script>document.write(new Date().getFullYear());</script>
All rights reserved | made with Colorlib - More Templates- Collect
</p>
</div>
</div>
<div class="col-lg-5col-md-6 col-sm-6">
<div class="single-footer-widget">
<h6>Newsletter</h6>
<p>Stay update with our latest</p>
<div class="" id="mc_embed_signup">
<form target="_blank" novalidate
action="#/subscribe/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01" method="get"
class="form-inline">
<input class="form-control" name="EMAIL" placeholder="Enter Email"
onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter Email '"
required="" type="email">
<button class="click-btn btn btn-default"><i class="fa fa-long-arrow-right"
aria-hidden="true"></i></button>
<div style="position: absolute; left: -5000px;">
<input name="b_36c4fd991d266f23781ded980_aefe40901a" tabindex="-1" value="" type="text">
</div>
<div class="info"></div>
</form>
</div>
</div>
</div>
<div class="col-lg-2 col-md-6 col-sm-6 social-widget">
<div class="single-footer-widget">
<h6>Follow Us</h6>
<p>Let us be social</p>
<div class="footer-social d-flex align-items-center">
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-dribbble"></i></a>
<a href="#"><i class="fa fa-behance"></i></a>
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- End footer Area -->
<script src="./index/js/vendor/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="./index/js/vendor/bootstrap.min.js"></script>
<script src="./index/js/easing.min.js"></script>
<script src="./index/js/hoverIntent.js"></script>
<script src="./index/js/superfish.min.js"></script>
<script src="./index/js/jquery.ajaxchimp.min.js"></script>
<script src="./index/js/jquery.magnific-popup.min.js"></script>
<script src="./index/js/owl.carousel.min.js"></script>
<script src="./index/js/jquery.sticky.js"></script>
<script src="./index/js/jquery.nice-select.min.js"></script>
<script src="./index/js/parallax.min.js"></script>
<script src="./index/js/waypoints.min.js"></script>
<script src="./index/js/jquery.counterup.min.js"></script>
<script src="./index/js/mail-script.js"></script>
<script src="./index/js/main.js"></script>
</body>
</html>
这个是首页 爱吾爱 发表于 2019-12-25 16:14
查看相关配置 首先查看页面引入时type类型是否正确 如果正确 检查web拦截配置 你这个啥也没 ...
感谢大哥,原因找到了@WebServlet(name = "ShowIndexServlet", urlPatterns = "/")是urlPatterns = "/"这玩意引起的,原因还不知道。。。。:lol 爱吾爱 发表于 2019-12-25 16:14
查看相关配置 首先查看页面引入时type类型是否正确 如果正确 检查web拦截配置 你这个啥也没 ...
感谢大哥,原因找到了@WebServlet(name = "ShowIndexServlet", urlPatterns = "/")是urlPatterns = "/"这玩意引起的,原因还不知道。。。。
页:
[1]
2