You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "ramk.fmk" <ra...@gmail.com> on 2008/04/30 12:53:36 UTC

problem sending values to dao class

Hi,

I am trying to build a simple login application using struts, spring and
hibernate. I have created a registration page.
When I submit the registration information (i.e. username and password),
Null values are sent for the username and password to the Dao.

Please see below the details

1. Registration.jsp
    <body>
	<s:form action="Registration" validate="true">
	    <s:textfield key="username" />
	    <s:password key="password" showPassword="true"/>			
	    <s:submit key="button.save"/>
	    <s:reset key="button.reset"/>
	</s:form>
    <body>

2. struts.xml
    <action name="Registration_*"  method="{1}" class="registrationAction">
	<result name="input">/Registration.jsp</result>
        <result name="success">/RegistrationSuccess.jsp</result>
    </action>


3. Spring configuration
    <bean id="registrationAction"
class="test.registration.struts.RegistrationAction">
	<constructor-arg ref="UserService" />
    </bean>


Any help regarding this is highly appriciated.

Thanks in advance,
Ram

-- 
View this message in context: http://www.nabble.com/problem-sending-values-to-dao-class-tp16980002p16980002.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: problem sending values to dao class

Posted by Mead Lai <la...@gmail.com>.
There is no RegistrationAction Code here.
I think it mostly something wrong in Action.
just print the username & password value in the Action, it's no
relation with DAO.
the following is some sample & demo for download. Wish it's useful for U
http://www.learntechnology.net

luck,
########################
Mead
laiqinyi@gmail.com
#########################

On Wed, Apr 30, 2008 at 6:53 PM, ramk.fmk <ra...@gmail.com> wrote:
>
>  Hi,
>
>  I am trying to build a simple login application using struts, spring and
>  hibernate. I have created a registration page.
>  When I submit the registration information (i.e. username and password),
>  Null values are sent for the username and password to the Dao.
>
>  Please see below the details
>
>  1. Registration.jsp
>     <body>
>         <s:form action="Registration" validate="true">
>             <s:textfield key="username" />
>             <s:password key="password" showPassword="true"/>
>             <s:submit key="button.save"/>
>             <s:reset key="button.reset"/>
>         </s:form>
>     <body>
>
>  2. struts.xml
>     <action name="Registration_*"  method="{1}" class="registrationAction">
>         <result name="input">/Registration.jsp</result>
>         <result name="success">/RegistrationSuccess.jsp</result>
>     </action>
>
>
>  3. Spring configuration
>     <bean id="registrationAction"
>  class="test.registration.struts.RegistrationAction">
>         <constructor-arg ref="UserService" />
>     </bean>
>
>
>  Any help regarding this is highly appriciated.
>
>  Thanks in advance,
>  Ram
>
>  --
>  View this message in context: http://www.nabble.com/problem-sending-values-to-dao-class-tp16980002p16980002.html
>  Sent from the Struts - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org