Java Reference
In-Depth Information
<tr><td colspan='2'> <input name="submit" type="submit" /> </td></tr>
<tr><td colspan='2'><input name="reset" type="reset" /></td></tr>
</table>
</form>
</body>
</html>
This login form is specific to the application, and hence I will configure this to work
with the front controller servlet, as shown in Listing 6-6.
Listing 6-6. insurance-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=" http://www.springframework.org/schema/beans"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" >
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
<bean name="/login.do"
class="org.springframework.web.servlet.mvc.UrlFilenameViewController">
</bean>
<!-- other beans to be shown later -->
</beans>
As shown in Listing 6-5, this is a simple login form. If you fill in the two text fields and
submit this form, it will result in the following URL: http://localhost/eInsureWeb/
j_spring_security_check?j_username=value1&j_password=value2 .
 
Search WWH ::




Custom Search