Last active
March 30, 2017 14:51
-
-
Save LumberSzquatch/f9cc64adb4528aecdac7c3ad1365152b to your computer and use it in GitHub Desktop.
SpringBoot MVC Tutorial/Experiment with JSP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> | |
| <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| <html lang="en"> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script> | |
| <!-- Access the bootstrap Css like this, | |
| Spring boot will handle the resource mapping automcatically --> | |
| <link rel="stylesheet" type="text/css" href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" /> | |
| <!-- | |
| <spring:url value="/css/main.css" var="springCss" /> | |
| <link href="${springCss}" rel="stylesheet" /> | |
| --> | |
| <c:url value="/css/main.css" var="jstlCss" /> | |
| <link href="${jstlCss}" rel="stylesheet" /> | |
| </head> | |
| <body> | |
| <nav class="navbar navbar-inverse"> | |
| <div class="container"> | |
| <div class="navbar-header"> | |
| <a class="navbar-brand" href="#">Spring Boot</a> | |
| </div> | |
| <div id="navbar" class="collapse navbar-collapse"> | |
| <ul class="nav navbar-nav"> | |
| <li><a href="welcome">Home</a></li> | |
| <li class="active"><a href="about">About</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| </nav> | |
| <div class="container"> | |
| <div class="starter-template"> | |
| <h1>Spring Boot Web JSP Example About Page</h1> | |
| <h2>Message: ${message}</h2> | |
| <p>Here is a fucking button, click it or something, or don't, it doesn't do fucking anything.</p> | |
| <button id="click">Fucking Click Me!</button> | |
| </div> | |
| </div> | |
| <script type="text/javascript" src="webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by Zachary on 3/29/2017. | |
| */ | |
| $(document).ready(function() { | |
| $("#click").click(function() { | |
| alert("I fucking lied! I do, do something; Muwhahahahah"); | |
| }); | |
| })(jQuery); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Project structure:
