On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaoui<bejaouiz...@hotmail.com> wrote:
> Thanks for the help guys.
>
> change User usr= userService.getUser(username);
> to         User usr=userServiceImp.getUser(username);
>
> userService is a UserServiceImp instance--> UserServiceimp userService.
>

You were on the right track before, you just want the following in your class -

->snippet
private UserService userService;

public void setUserService(UserService userService) {
  this.userService = userService;
}
<- end snippet

I am curious if it's 'userService' that is null... This would mean
that your action isn't being wired with the service from Spring. I
snipped all the previous messages from this email, so i can't look
through it for you, but I will say that this sort of thing is
generally a simple property misspelling or some other detail (decimal
point? I always mess up some mundane detail). If it's username that is
null, you might want to check that your form is properly setup in your
JSP.

-Wes


-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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

Reply via email to