Hi there, I have a JSP page that is trying to access a requestScope variable.. When I try ${requestScope.answer} it gives me the object reference instead of the value. Sorry I'm new at this and I'm thinking its Java casting issue, any suggestions on how I can fix this would be appreciated!
Using the MVC paradigm, my View JSP takes a number from the user, forwards it to a Controller which parses it to an Integer and then pokes it into a certain java class that computes the resolution of that integer. I set that computed answer as an attribute:
where Resolver is the constructor.
Now when I try to access this attribute answer in the View by using ${requestScope.answer} it shows me something as model.Resolver@1716fa0 (where class Resolver is in the model package).
I'm not sure if this info is enough, as you can tell, I'm lost...
Suppose the number entered is 10, then the resolution is 5 2. So somehow I need to cast that object reference to some other data type.. When I try to parse it to String or Integer, it says it cannot do so.