struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Delgado Trujillo <jadt...@gmail.com>
Subject Re: Instancia the bean
Date Tue, 02 Jan 2018 22:18:44 GMT
I think Strus2 don’t instantiate the bean so you must instantiate perhaps in the prepare
method or in the definition of the property class.

> On 2 Jan 2018, at 21:38, José Antonio Delgado Trujillo <jadtmat@gmail.com> wrote:
> 
> If you have a form linked to a bean using key attribute, then when you submitted, must
you instantiate the bean before the call action populate the properties? Or Strust2 instantiate
automatically after you call the action.
> 
> <form action=“a”>
> 	<s:textField key=“bean.t”/>
> <submit/>
> 
> //The method execute of the A class action
> 
> public class A extends AcctionSupport{
>     private Object bean;
> 
>     public String void execute(){
>         //Call business logic method
>         control(bean);
> 	return SUCCESS;
>     }
> }
> 
> This throws a NullpointerException???
> 
> 
> 
> Un saludo,
> José A.
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message