Best way to pass "return info" from a method (DAO to Controller) e.g
Hello all. I have a MVC type setup for a system I am developing and I am having a few problems with return info.
The controller calls methods from other classes and they always return something, mostly strings. But sometimes I need to return multiple strings, e.g username, password, location, etc.
So when I call the method from the controller I simply pass the request object to it and the method does its thing. But I tried returning objects but they always come back as null when I access them from the controller.
Say I added some strings to the request object formRequest from the DAO for them to be returned to the controller for further manipulation, how should I do it ? I tried using "return formRequest" but it comes back null when the controller tries to access "formRequest" and if I try to use "request" on compile it says the variable request does not exist.
To access a method returned object, what should the syntax be ?
I don't want to have to create objects as attributes of the DAO so I can access them from the controller, i.e testDAO.attributeName, but this is the only way I can see to get access to these objects.
Should I use the requestDispatcher ?
Any help appeciated.

