You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rakesh K nair <ra...@gmail.com> on 2010/01/04 08:40:20 UTC

struts 2 validation error

Hi

In my struts2 jsp page there is a "selection list".I am populating the
"list" from action class before rendering the page.I have some validation in
the page.After submitting it calls the same page.If validation is successful
it enters the action class and initializes the "list" , but if it is failure 
then it will go to "input" result from there to jsp page without entering
action class then raising an null pointer exception.I need that "list" even
if the validation fails.

Please help me to get out of this problem

expecting your kind interaction

thanks in advance

rakesh
-- 
View this message in context: http://old.nabble.com/struts-2-validation-error-tp27009670p27009670.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: struts 2 validation error

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Rakesh,
use preparable interface and in prepare method initialize anything
that is necessary to show that page.

Best greetings,
Pawel Wielgus.

2010/1/4, Rakesh K nair <ra...@gmail.com>:
>
> Hi
>
> In my struts2 jsp page there is a "selection list".I am populating the
> "list" from action class before rendering the page.I have some validation in
> the page.After submitting it calls the same page.If validation is successful
> it enters the action class and initializes the "list" , but if it is failure
> then it will go to "input" result from there to jsp page without entering
> action class then raising an null pointer exception.I need that "list" even
> if the validation fails.
>
> Please help me to get out of this problem
>
> expecting your kind interaction
>
> thanks in advance
>
> rakesh
> --
> View this message in context:
> http://old.nabble.com/struts-2-validation-error-tp27009670p27009670.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


Re: struts 2 validation error

Posted by Greg Lindholm <gr...@gmail.com>.
See the FAQ

http://struts.apache.org/2.x/docs/how-do-we-repopulate-controls-when-validation-fails.html

On Mon, Jan 4, 2010 at 2:40 AM, Rakesh K nair <ra...@gmail.com> wrote:
>
> Hi
>
> In my struts2 jsp page there is a "selection list".I am populating the
> "list" from action class before rendering the page.I have some validation in
> the page.After submitting it calls the same page.If validation is successful
> it enters the action class and initializes the "list" , but if it is failure
> then it will go to "input" result from there to jsp page without entering
> action class then raising an null pointer exception.I need that "list" even
> if the validation fails.
>
> Please help me to get out of this problem
>
> expecting your kind interaction
>
> thanks in advance
>
> rakesh
> --
> View this message in context: http://old.nabble.com/struts-2-validation-error-tp27009670p27009670.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