struts2使用struts2-bootstrap-plugin插件
1、下载插件
http://code.google.com/p/struts2-bootstrap/
2、添加maven依赖
<dependency>
<groupId>com.jgeppert.struts2.bootstrap</groupId>
<artifactId>struts2-bootstrap-plugin</artifactId>
<version>2.0.0</version>
</dependency>
3、JSP页面头
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
...
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<sb:head/>
</head>
<body>
...
</body>
</html>
4、JSP页面中可以直接用bootstrap标签了
<s:actionerror theme="bootstrap"/>
<s:actionmessage theme="bootstrap"/>
<s:fielderror theme="bootstrap"/>
<s:form action="index" enctype="multipart/form-data" theme="bootstrap" cssClass="form-horizontal"
label="A sample horizontal Form">
<s:textfield label="Name" name="name" tooltip="Enter your Name here"/>
<s:textfield label="Textfield with Error" name="error"/>
<s:textarea tooltip="Enter your Biography" label="Biography" name="bio" cols="20" rows="3"/>
<s:select tooltip="Choose Your Favourite Color" label="Favorite Color" list="{'Red', 'Blue', 'Green'}" name="favouriteColor" emptyOption="true" headerKey="None" headerValue="None"/>
<s:checkboxlist tooltip="Choose your Friends" label="Friends" list="{'Wes', 'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" name="friends"/>
<s:checkboxlist tooltip="Checkboxes with inline position" labelposition="inline" label="Friends Inline" list="{'Wes', 'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" name="friendsInline"/>
<s:radio tooltip="Choose your Best Friend" label="Best Friend" list="{'Wes', 'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" name="bestFriend" cssErrorClass="foo"/>
<s:radio tooltip="Radio Buttons with inline position" label="Best Friend Inline" labelposition="inline" list="{'Wes', 'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" name="bestFriend" cssErrorClass="foo"/>
<s:checkbox tooltip="Confirmed that your are Over 18" label="Age 18+" name="legalAge"/>
<s:doubleselect tooltip="Choose Your State" label="State" name="region" list="{'North', 'South'}" value="'South'" doubleValue="'Florida'" doubleList="top == 'North' ? {'Oregon', 'Washington'} : {'Texas', 'Florida'}" doubleName="state" headerKey="-1" headerValue="---------- Please Select ----------" emptyOption="true"/>
<s:file tooltip="Upload Your Picture" label="Picture" name="picture"/>
<s:optiontransferselect tooltip="Select Your Favourite Cartoon Characters" label="Favourite Cartoons Characters" name="leftSideCartoonCharacters" leftTitle="Left Title" rightTitle="Right Title" list="{'Popeye', 'He-Man', 'Spiderman'}" multiple="true" headerKey="headerKey" headerValue="--- Please Select ---" emptyOption="true" doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}"
doubleName="rightSideCartoonCharacters" doubleHeaderKey="doubleHeaderKey" doubleHeaderValue="--- Please Select ---" doubleEmptyOption="true" doubleMultiple="true"/>
<s:textarea label="Your Thougths" name="thoughts" tooltip="Enter your thoughts here"/>
<s:submit cssClass="btn"/>
</s:form>

问题1:Unable to load configuration. - bean - jar:file:/D:/ProgramServer/Tomcat7/wtpwebapps/happycar/WEB-INF/lib/struts2-bootstrap-plugin-2.0.0.jar!/struts-plugin.xml
原因?==》struts2升级到2.3.20
问题2:
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
struts2使用struts2-bootstrap-plugin插件的更多相关文章
- Bootstrap按钮插件
前面的话 按钮插件提供了一组可以控制按钮多种状态的功能,比如按钮的禁用状态.正在加载状态.正常状态等.本文将详细介绍Bootstrap按钮插件 加载状态 通过按钮可以设计状态提示,当单击按钮时,会显示 ...
- 50个Bootstrap扩展插件
Bootstap这个框架本身已经包含了开发网页的众多要素,包括了常用的工具以及扩展组件,如果你在开发页面时觉得在某些方面还不够的话,不妨看看最新收集的50个Bootstrap扩展插件,这些插件在我们平 ...
- Jenkins 安装的HTML Publisher Plugin 插件无法展示ant生成的JunitReport报告
最近在做基于jenkins ant junit 的测试持续集成,单独ant junit生成的junitreport报告打开正常,使用Jenkins的HTML Publisher Plugin 插件无 ...
- bootstrap时间插件 火狐不显示 完美解决方法
原文链接:http://www.phpbiji.cn/article/index/id/141/cid/4.html bootstrap时间插件火狐 bootstrap-datetimepicker火 ...
- Bootstrap 分页插件 ajax获取数据显示
Bootstrap 分页插件 ajax获取数据显示 标签(空格分隔): bootstrap 文章的内容是使用bootstrap-paginator进行分页,使用ajax获取后台数据.渲染. 1. 版本 ...
- AS Gradle构建工具与Android plugin插件【大全】
Android plugin version 与 gradle version 的关系 Gradle是一种构建工具,它通过编写一个名为build.gradle的脚本文件对项目进行设置,再根据这个脚本对 ...
- 18.如何自我Struts2它Struts2标签和综合汇总文章有点早
18.如何自我Struts2它Struts2标签和综合汇总文章有点早[视频] 之前写了一篇"打算做一个视频教程探讨怎样自学计算机相关的技术",优酷上传不了.仅仅好传到百度云上: h ...
- 13.怎样自学Struts2之Struts2本地化[视频]
13.怎样自学Struts2之Struts2本地化[视频] 之前写了一篇"打算做一个视频教程探讨怎样自学计算机相关的技术",优酷上传不了,仅仅好传到百度云上: http://pan ...
- 16.怎样自学Struts2之Struts2异常处理[视频]
16.怎样自学Struts2之Struts2异常处理[视频] 之前写了一篇"打算做一个视频教程探讨怎样自学计算机相关的技术",优酷上传不了,仅仅好传到百度云上: http://pa ...
- Twitter Bootstrap JavaScript插件
Twitter Bootstrap JavaScript插件本文收集了10款非常不错的JavaScript Twitter bootstrap扩展插件,利用Boostrap开发者可以节省大量的时间修复 ...
随机推荐
- 交换a、b
有两个变量a和b,不使用任何中间变量交换a和b. 方法一: 采用如下方法: a=a+b; b=a-b; a=a-b; 这样做的缺点就是如果a.b都是比较大的数,则a=a+b时就会越界. 而采用: a= ...
- spring源码分析之spring-messaging模块详解
0 概述 spring-messaging模块为集成messaging api和消息协议提供支持. 其代码结构为: 其中base定义了消息Message(MessageHeader和body).消息处 ...
- Getting Started with Zend Framework MVC Applications
Getting Started with Zend Framework MVC Applications This tutorial is intended to give an introducti ...
- SimpleAliasRegistry implements AliasRegistry
Spring - 4.2.3 // name,alias存储容器 ConcurrentHashMap <alias,name>private final Map<String, St ...
- 沈逸老师PHP魔鬼特训笔记(2)
一.这一课会学习到几个懒人函数: 1.file_put_contents (PHP 5, PHP 7) file_put_contents — 将一个字符串写入文件 说明 int file_put_c ...
- Python文件IO
Python文件IO 有如下文本内容,文件路径为D:\temp,文件名称为lyric.txt, line1 Look ! line2 If U had one shot line3 One oppor ...
- Python基础复习_Unit one
一. 编译&&安装Python2.7 1.安装python第三方模块管理工具 easy_install --->> easy_install-2.7 pip Ipy ...
- CF A and B and Compilation Errors (排序)
A and B and Compilation Errors time limit per test 2 seconds memory limit per test 256 megabytes inp ...
- Oracle查找被长时间锁定的对象并kill
1.用如下语句查找被锁住的表名.OSclient.Session信息 SELECT B.SID ,B.SERIAL# ,D.SPID OS系统进行号 ...
- Nginx环境下配置PHP使用的SSL认证(https)
最近一段时间发现好多网站都从http协议变成了加密的https协议,比如说百度.吾志等等.https看起来比http高端了好多,而且在不同的浏览器向上还会显示出不同于http的URL展示效果(比如说c ...