Java Reference
In-Depth Information
</bean>
<bean name="/secure/home.do"
class="org.springframework.web.servlet.mvc.UrlFilenameViewController">
</bean>
</beans>
As shown in Listing 7-5, UrlFileNameViewController is used to display both the login
page and the home page. You may later want to use a different controller implementation
for the home or login page depending on requirement changes. The home page, for
instance, may require displaying the list of all the pending orders when the user signs on.
The home page shown in Listing 7-6 displays a simple form to place an order. It also con-
tains a link to launch a pop-up window to search and select a service. Note that home.jsp
has been placed in the secure folder.
Listing 7-6. /WEB-INF/jsp/secure/home.jsp
<%@ taglib prefix="form" uri=" http://www.springframework.org/tags/form" %>
<html>
<head>
<title>Place an Order</title>
</head>
<body>
<form action="saveOrder.do" method="POST">
<form:errors path="*" />
<table>
<tr>
<td>Item Id:</td>
<td><input type='text' name='itemId' readonly="readonly"/></td>
<td><input value="Find Item" name="FindItem"
type="button" onClick="openItemSearchWindow()"/></td>
</tr>
<tr>
<td>Item Name</td>
<td><input type= 'text' name= 'ItemName' /></td>
</tr>
<tr>
<td>Item Description</td>
 
Search WWH ::




Custom Search