Announcement Announcement Module
Collapse
No announcement yet.
<form:form> tag Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <form:form> tag

    Hi all.
    I have the question about how the form:form tag works.

    In my login.jsp I have the following form:
    Code:
    <form:form method="post" commandName="loginCommand">
    ...
    </form:form>
    here is my controller declaration into the context xml:
    Code:
    <bean id="loginController" class="com.smvc.controller.LoginController">
    	<property name="formView" value="login"/>
    	<property name="successView" value="forward:/greeting.htm"/>
    	<property name="commandClass" value="com.smvc.command.LoginCommand"/>
     	<property name="commandName" value="loginCommand"/>
    		
    	<property name="validator">
    		<bean class="com.smvc.validator.LoginValidator"/>
    	</property>
    	</bean>
    So when I first time open the login.jsp (just type the address in the browser's address bar, that means GET method), the controller is not triggered, but the attribute with the name "loginCommand" has already presented into request object.
    When (on which stage) is it set into the request?

    Thanks.
    Last edited by Yasson; Mar 29th, 2007, 02:36 PM.
Working...
X