This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
when i was practise a small application i got the error msg "DogBean cannot be resolved to a type"
I have a html form that sends 2 parameter to a controller servlet(named Controller.java),
In this servlet i set both of these parameters as attributes of next request, along with this i set an object of DogBean(a bean class containing 2 properties) as request attribute.
And call a JSP(using RequestDispatcher) named result.jsp (It will just display these attribute values).
<%= request.getAttribute("name") %> 1st attribute( contains the value of 1st parameter of HTML form)
<%= request.getAttribute("type") %> 2nd attribute( contains the value of 2nd parameter of HTML form)
<%= request.getAttribute("dog") %> 3rd attribute ( contains the object of DogBean)
gives the expected result
when i try to type cast it to DogBean the error occurs.