簡體   English   中英

在HTML中使用Spring標簽

[英]Use spring tags in html

<!doctype html>
<head>
    <meta charset="utf-8">
    <title>Urban Wolf - Boutique Brand Management Firm</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="theme-color" content="#fff">
    <meta name="description" content="Urban Wolf, the Palm Beach based boutique brand management firm with specializations in brand development, branding, and business consulting. No one wants to be the sheep">
    <link rel="shortcut icon" href="Sheep/img/favicon-client2.png" type="image/png">
    <link rel="icon" href="Sheep/img/favicon-client2.png" type="image/png">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" media="all" href="Sheep/css/app.css">
</head>

<body>
    <p class="form__placehold">Full Name</p> <input class="form__input" name="name" type="text" pattern="^[а-яА-ЯёЁa-zA-Z0-9\s]+$" required>
    <p class="form__placehold">Email</p> <input class="form__input" type="email" name="_replyto" pattern="/^[\w]{1}[\w-\.]*@[\w-]+\.[a-z]{2,4}$/i" required> <button class="form__btn" type="submit">Send Now</button> </form>
    </div>
    </div>
    </div>
    <!--end map-block-->
    <footer class="footer">
    <div class="container">
    <a class="footer__logo" href="#"> <svg class="icon icon-logo"><use xlink:href="Sheep/img/sprite.svg#icon-logo"></use></svg> </a>
    <p class="footer__copyright"> <span>&copy;</span> 2017 URBAN WOLF MANAGEMENT LLC. ALL RIGHTS RESERVED </p>
    </div>
    </footer>
    </div>
</body>
</html>

如何將Spring標簽連接到HTML文檔,真的嗎? 或者,如果我使用Spring,我必須僅使用JSP頁面?

您將包括spring標簽。 要包含spring標記,JSP文件應具有以下定義的信息。

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

強烈建議使用JSTL標簽。 但是要開始使用整個spring標簽,可以在GITHUB repo。, pet-clinic中使用spring框架示例。 干杯。

如果要使用Spring標記/ Spring表單,則只需使用jsp文檔。 如果需要,可以在單個jsp頁面中混合使用Spring表單標簽和HTML表單標簽。

您必須為此使用JSP ...您可以在此處找到更多信息,如果您不想使用JSP,可以嘗試使用Thymeleaf

如果要在html中使用Spring標記,則必須使用JSP。 如果您希望頁面看起來更像HTML,可以使用thymeleaf 您可以在此處找到使用百里香葉的區別/優勢。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM