struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Ansorg <jans...@ksi.gr>
Subject Re: Action Execute Being called 2 times
Date Fri, 01 Aug 2008 12:07:53 GMT
Hi,
you use the same action to render the welcome screen and Registrer.jsp.

So this means that when you display the welcome screen execute() is 
called and when you display the Registrer.jsp page.

Either use two separate actions or just return null in execute and have 
another action method (i.e. save()) which writes into the db.
In the page with the submit button link to the action's save method. So 
execute is used for welcome and save for the registration.

Hope that helps,
Joachim
> Hi All,
>
> While developing an application in struts2 i am facing a strange problem
> with one of my action namely RegsitrationAction.
> i have a jsp page for user registration where there are certain fields for
> the user to be filled for the registration purpose.
> i have created a UserProfile bean class with the bean properties for all the
> user registration field.

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


Mime
View raw message