0

Bootstrap is working when I run a jsp on it's own, but when I run my project (jsp goes to servlet and the servlet goes to another jsp through RequestDispatcher (which should use bootstrap styles) the bootstrap is no longer working.

I have downloaded bootstrap js and css files and have this in my jsp -

<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src=../bootstrap/js/bootstrap.min.js"></script>

Is there something else I need to do to make it work through the servlet?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
bb25
  • 55
  • 1
  • 8
  • @BalusC that doesnt particularly answer my question.. so am I supposed to put `href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css" ` ? The answer to that question confused me quite a bit – bb25 Apr 21 '20 at 13:01
  • import bootstrap from cdn – abhinavsinghvirsen Apr 21 '20 at 13:46
  • As explained in the duplicate, the `href` has to point to the URL of the bootstrap file, not to the disk file system path of the bootstrap file. – BalusC Apr 21 '20 at 14:11

0 Answers0