2017-09-26 36 views
0
<!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页面?在html中使用spring标签

回答

0

如果你想使用Spring标签/ Spring表单,你只能使用jsp文档。如果需要,您可以在单个jsp页面中混合使用Spring表单标签和HTML表单标签。

0

必须使用JSP这个......你可以找到更多信息here, 如果你不想用JSP工作,你可以用Thymeleaf

0

尝试你将有包括弹簧接头。为了包含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回购的弹簧框架样本,pet-clinic。干杯。

0

如果你想在html中使用Spring标签,你必须使用JSP。如果你想让页面看起来更加HTML-ish,你可以使用thymeleaf。你可以找到使用百里香here的差异/优势。