in jsp, can use bootstrap classes in html. i've seen in projects, people use taglibs manner adding maven dependency like:
<dependency> <groupid>com.efsavage.twitter.bootstrap</groupid> <artifactid>bootstrap-maven</artifactid> <version>2.3.1</version> </dependency>
then including taglib in jsp file:
<%@ taglib uri="http://efsavage.com/twitter-bootstrap" prefix="bs" %>
and using tags like:
<bs:button text="submit" />
my question when , why way better linking twitter bootstrap css file , using classes in our jsp pages?
there several reasons this. when want include 3rd party css or javascript resource, have 2 choices:
- point directly @ external resource serves it
- download , include in project
pointing @ external resources can problematic: can die @ anytime or temporarily down. such approach, dependent on outside of control, bad idea.
this leave approach of downloading manually , including in project. conceptually, depending on library , maven tool supposed handle that. hence adding maven dependency makes sense: declaring project dependent on external resource.
from the github repo:
this library gives way drop twitter bootstrap project maven dependency, means don't have include these third party files in own source control.
Comments
Post a Comment