Results 1 to 1 of 1

Thread: <form:form> tag

Threaded View

  1. #1

    Default <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 at 02:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •