Skip to main content

Posts

Showing posts with the label ajax

Struts 2 Ajax drop down Example

Struts 2 has emerged as boon for developers. But the documentation available is very small. So I had decided to give a brief demonstration of the ajax used in struts 2.1.8.1 Libraries used: commons-beanutils-1.7.0.jar commons-fileupload-1.2.jar commons-logging-1.1.jar commons-logging-api-1.1.jar freemarker-2.3.8.jar struts2-core-2.1.8.1.jar struts2-dojo-plugin-2.1.8.1.jar xwork-core-2.1.6.jar In this example when u select from one drop down the other will populate accordingly. You can use it as it is or play with it. Enjoy !! index.jsp <%@ taglib prefix="s" uri="/struts-tags" %> <s:action name="ListingAction" executeResult="true"></s:action> listing.jsp <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="sx" uri="/struts-dojo-tags"%> Listing detail.jsp <%@ taglib prefix="s" uri="/struts-tags"