我有spring mvc提供的文本框和表单页面中的按钮,如何在这些标签中包括twitter bootstrap。我将引导相关文件放在文件夹结构中的什么位置,使用引导需要哪个jar?
示例文本框包括:
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<form:form method="post" commandName="stdcmd">
username:<form:form path="txtUname">
password:<form:form path="txtPwd">
<input type="submit" value="register"/>
</form:form> 发布于 2015-10-11 11:18:18
要使用引导程序,您需要将引导程序文件放在web文件夹中。例如,resources/bootstrap文件夹。然后在jsp中添加指向这些文件的链接,如下所示:
<link rel='stylesheet' href='resources/bootstrap/bootstrap.min.css'>
<script type="text/javascript" src="resources/bootstrap/bootstrap.min.js"></script>在您的spring配置文件中还包含以下内容:
<mvc:resources mapping="/resources/**" location="/resources/bootstrap您应该能够从bootstrap访问这些类并将其应用到您的jsp中。
https://stackoverflow.com/questions/32933272
复制相似问题