Home > Web Front-end > Bootstrap Tutorial > Let's talk about how to import bootstrap into jsp pages

Let's talk about how to import bootstrap into jsp pages

青灯夜游
Release: 2021-02-07 18:24:03
forward
3188 people have browsed it

Let's talk about how to import bootstrap into jsp pages

Related recommendations: "bootstrap Tutorial"

1. First import the following three files into WebContent (go to the official website to download by yourself: bootstrap##,jQuery

2. Create a new .jsp file, such as index.jsp , now import the following files into the tag, be careful not to reverse the order

<script src="${pageContext.request.contextPath }/js/jquery-3.3.1.min.js"></script>
<link href="${pageContext.request.contextPath }/css/bootstrap.min.css"  rel="stylesheet">
<script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
Copy after login

3. Then you can use boostrap, just add "class" to the tag. You can go

here Choose the style you want

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>




Insert title here
<script src="${pageContext.request.contextPath }/js/jquery-3.3.1.min.js"></script>
<link href="${pageContext.request.contextPath }/css/bootstrap.min.css"  rel="stylesheet">
<script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>


    
id username password
1 李疆 111
2 李二 222
3 张三 333
Copy after login

4. Run the results

For more programming-related knowledge, please visit:

Programming Teaching! !

The above is the detailed content of Let's talk about how to import bootstrap into jsp pages. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template