---
title: "Struts 2 with Ajax"
author: "skysun"
date: "2010-04-19T10:33:06Z"
tags: ["Ajax", "Apache", "Dojo", "JSP", "Struts"]
categories: ["企业架构"]
slug: "struts-2-with-ajax"
draft: false
lastmod: "2010-04-19T10:33:06Z"
id: 647175
url: "https://skysun.iteye.com/blog/647175"
---

Struts and Struts2 compared to a major improvement is support for Ajax. In this paper, look at the Div in Struts2 is how Ajax used to output the results, the main use of the Dojo. First of all, we first create a simple use case, in this use case will be displayed on the screen of a user list, click on the userid list, the list below will show the user detailed information, showing detailed information of the user steps we will the use of Ajax. First, create a web.xml struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 / * Second, create struts.xml / userlisting.jsp / userdetail.jsp III, page: userlisting.jsp Displays list of users &lt;% @ Taglib prefix = "s" uri = "/ struts-tags"%&gt;