How to use jQuery with struts 2 Framework
Basic usage of jQuery in Struts 2 Framework
If you want to make use of tags in struts2-jquery then:
1) You need to download the struts-2-jquery-plugin jar file and include it in classpath of your application.
2) Next step is to use the tag library of struts jQuery on jsp page of your application.
3) Now you need to add <sj:head> tag into the head tag of jsp page.
There are number of tags/widgets that are implemented using struts2-jQuery plug-in.
1) Head: It is the base tag to include the functionality of plugin in particular page.
2) Anchor: It provides rendering to anchor by which it can execute ajax request, load content from remote source using ajax in any container and submit/validate particular form or its input elements.
3) Div: used to render the div tab
4) Form: used to render the form tag to submit content using ajax, perform validation, loading the output of post in any container.
5) Select: used to render the select tag to load content remotely using ajax.
6) Submit: used to render the submit tag
7) Text: can render any text and update dynamically.
8) TextField: used to render input tag box.
9) TextArea: used to render textarea tag to add content remotely using ajax.
10) Accordion: used to load menu remotely using ajax
11) Date Picker: used to render datepicker
12) Button: provides an attractive component of button.
13) Dialog: provides all features of jQuery dialog.
14) Tabbed Pane: used to Select/Enable/Focus tabs dynamically.
15) Chart: provides very good dynamic capability to charts.
16) Grid: provides the customizable component of grid.
Looking for Jquery,Struts, java etc related projects , just grab from here Online Java Projects
Following is an example of the use of jQuery with Struts 2 Framework
Having support for datepicker component.
alert(“Datepicker selected date”);
<sj:datepicker displayFormat=”MM/dd/yyyy” changeYear=”true” changeMonth=”true”/>
<sj:datepicker displayFormat=”yyyy-MM-dd” imageUrl=”images/datepicker.gif” imageTooltip=”Select Your Birthdate” showButton=”true” changeYear=”true” changeMonth=”true”/>