文档介绍:1. 建立工程首先在 eclipses 上建立一个 web 工程,点击 File->new->Others ,选择 Web Project ,如下图所示: 点击 next ,在 Project Name 中填入工程名称,在 J2EE Specificatio Level 选项中选择 ,点击 Finish 就建立了一个 Structs 工程。 2. 引入 Spring 需要的 jar 包将 , commons-logging- , , log4j- , r 包拷贝到工程所在目录 WebRoot/WEB-INF/lib 下。 JSP 页面主要有两个 JSP 页面,分别为 和 。 I : <%@ page session = "false" %> <%@ taglib prefix = "c" uri = "http://java./jstl/core" %> <%@ taglib prefix = "fmt" uri = "http://java./jstl/fmt" %> 引入了 jstl 的两个标签 I 启动后便跳转到 页面<%@ include file = "/WEB-INF/jsp/" %> <%-- Redirected because we can't set the e page to a virtual URL. --%> < c:redirect url = "/" /> < html >< head >< title > Example - Spring Application </ title > </ head >< body > This is my test. < br > </ body > </ html >H : <%@ include file = "/WEB-INF/jsp/" %> < html >< head >< title >< fmt:message key = "title" /></ title > </ head >< body >< h1 > heading </ h1 ><p> Greeting < c:out value =" ${} " /> </ p>< h3 > Products </ h3 >< c:forEach items =" ${} " var = "prod" > < c:out value =" ${} " /> <i>$< c:out value =" ${} " /></ i> < br >< br > </ c:forEach >< br ><a href ="< c:url value = "" /> "> Increase Prices </ a>< br > </ body > </ html > P : <%@ include file = "/WEB-INF/jsp/" %> <%@ taglib prefix = "spring" uri = "/spring" %> < html >< head >< title >< fmt:message key = "title" /></ title > </ head >< body >< h1 >< fmt:message key = "" /> </ h1 >< form method = "post" > < table width = "95%" bgcolor = "f8f8ff" border = "0" cellspacing = "0" cellpadding = "5" > < tr >< td alignment = "right" width = "20%" > Increase (%): </ td >< spring:bind path = "" > < td width = "20%" >< input type = "text" name = "percentage" value ="< c:out value =" ${} " /> "> </ t