1 / 13
文档名称:

Spring开发流程.doc

格式:doc   大小:1,824KB   页数:13页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Spring开发流程.doc

上传人:54156456 2018/7/28 文件大小:1.78 MB

下载得到文件列表

Spring开发流程.doc

相关文档

文档介绍

文档介绍:建立工程
首先在eclipses上建立一个web工程,点击File->new->Others,选择Web Project,如下图所示:
点击next,在Project Name中填入工程名称,在J2EE Specificatio ,点击Finish就建立了一个Structs工程。
引入Spring需要的jar包
-logging-,,log4j-,-INF/lib下。
3. 发JSP页面
主要有两个JSP页面,。
:
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java./jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java./jstl/fmt" %>
引入了jstl的两个标签

<%@ 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>
:
<%@ 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>
:
<%@ 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="${}"/>">
</td>
<td width="60%">
<font color="red"><c:out value="${}" /></font>
</td>