I have just released my first GIT based Project at Google Code. Thanks to IntelliJ IDEA for the great GIT Integration.

This Struts2 Bootstrap Plugin is for an easy Integration of Twitter Bootstrap into an Bootstrap based Struts2 Webapp. It provides a Head Tag which loads necessary resources and a new theme for Struts2 Tags. A new Struts2 Bootstrap Plugin Showcase provides a short introduction how to use this Plugin.

Steps to use it in your Project:

1. Add the jar

To use this plugin you need to copy the struts2-bootstrap-plugin.jar into your WEB-INF/lib path. A maven Integration is following soon.

2. Add the Head Tag to your JSP

To load the required CSS Styles and JavaScript Resources you need to add the Head Tag to your html head area like following Example.

<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags" %>



    MyApp Title
    

    
    

    


...



3. Using the Form Tags

Now you are able to use the form theme, simple by adding the theme=”bootstrap” attribute to your tag.

    
    
    


    
        

        

        

        

        

        

        

        
    

Download: http://code.google.com/p/struts2-bootstrap/downloads/list
Showcase: http://struts.jgeppert.com/struts2-bootstrap-showcase/
Issues: http://code.google.com/p/struts2-bootstrap/issues/list

New Struts2 Bootstrap Plugin released
Tagged on:             

20 thoughts on “New Struts2 Bootstrap Plugin released

  • 2012-02-03 at 04:26
    Permalink

    Wow, this is great. I just learned about bootstrap today and found the new plugin for struts2.

    Can this plugin used with the struts-jquery plugin as well?

    Thanks for the nice plugin 🙂

    Reply
    • 2012-02-03 at 08:55
      Permalink

      I don’t have tested it yet against the Struts2 jQuery Plugin.
      But I see no resonse why it sould not work with it together.

      Reply
  • 2012-03-01 at 10:07
    Permalink

    In the showcase, advanced Bootstrap form with simple Type Ahead, entering ‘A’ displays the list ‘Alabama’,’Alaska’,’Arizona’,’Arkansas’. If you continue typing in the type ahead field and continue ‘l’ (so the box now contains ‘Al’ then the list then changes to ‘Alabama’, ‘Alaska’, ‘California’. Why?

    Reply
    • 2012-03-01 at 11:13
      Permalink

      Because C al ifornia includes “al”! 🙂

      The first times it does not show California because it is not in the first 4 search results. See the data-items=”4″ attribute.

      Reply
  • 2012-03-04 at 11:28
    Permalink

    The line is throwing up errors. I am using Eclipse and have Struts2 properly working in my project right now. What am I doing wrong?

    Reply
    • 2012-03-04 at 13:16
      Permalink

      Which line is throwing an error? Can you please give some more details about your problem? If you think this is an bug, please fill free to create an Issue.

      Reply
  • 2012-03-05 at 11:25
    Permalink

    The <sb:head/> line is throwing up errors of all sorts. The error log is as follows:
    org.apache.jasper.JasperException: An exception occurred processing JSP page /Test1.jsp at line 14

    11:
    12:
    13:
    14:
    15:
    16:
    17:

    I’m kind of new at struts. Please help me out.

    Reply
  • 2012-03-05 at 11:27
    Permalink

    Oh sorry, I copy pasted the log but it is wiped out in the post. The line 14 is exactly the <sb:head/>

    Reply
  • 2012-03-05 at 14:46
    Permalink

    Hey man, nice work you’ve done. I solved my previous error but encountered a new one. I’ve integrated the plugin well enough. But every jsp page now in my project is not executed. I get error 404 for each page, even the ones not using bootstrap tags. What could i’ve done wrong?

    Reply
  • 2012-03-05 at 17:16
    Permalink

    Please don’t bother with my earlier posts. I’ve solved all problems and its working fine now. I really have to say excellent job done. Salud!

    Reply
    • 2012-03-05 at 19:32
      Permalink

      Nice to here. 🙂

      What exactly was the problem/solution?

      Reply
  • 2012-03-05 at 20:43
    Permalink

    The problem was that after including the plugin in the lib folder, no struts tag was properly executed. All jsp pages were showing an http error 404. Anyhow, I downloaded youe entire showcase war package and ran the same on mine. Somehow it worked. Very lame, I know, but I’m new to struts and trying to learn more. I wanted to ask you if you’ve included the modal scripts in the plugin. If yes, how do I access them?

    Reply
    • 2012-03-06 at 19:35
      Permalink

      All scripts should be available. All you need is to include an reference to jquery and tag in your head area.

      $(‘#myModal’).modal()

      Reply
  • 2012-03-11 at 07:14
    Permalink

    Which Hibernate release should I use such that I can include this bootstrap plugin? Also I’m using the struts 2.0 and Hibernate 3.0 release and somehow this plugin isn’t working with those jars.

    Reply
    • 2012-03-12 at 18:00
      Permalink

      The Hibernate Release should not have any side effects to the Bootstrap Plugin. Maybe you need Struts2 2.1.x or higher instead of version 2.0.x.

      Reply
  • Pingback:Version 1.2.0 of Struts2 Bootstrap Plugin released | Java, Programming, Struts2, jQuery, Linux and more

  • 2012-07-02 at 09:33
    Permalink

    Hi friends

    I am using struts2.0 with bootstrap-plugin client side validations ,

    i wrote this code,it won’t client validations.please help me

    Reply
  • 2013-03-04 at 09:40
    Permalink

    Hi,
    iam trying to use Struts2 Bootstrap for client-Side Validation

    i added jar and Done jsp changes as present in showcase.

    are there any other prerequisites to use this .

    Reply
    • 2013-03-10 at 15:22
      Permalink

      Can you provide some Code Examples?
      Do you have the jsonValidationWorkflowStack Interceptor in your Interceptor Stack?

      @InterceptorRef(“jsonValidationWorkflowStack”)

      Reply

Leave a Reply to Siddharth Sakhadeo Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.