ya .I am using servlet.. but I want to show data in JSP.. so there are bean getters method from which I can show data to JSP.
but in JSP its giving me an error.. for Bean class not found ....
Joined: Oct 08, 2006
1) Create a servlet and map it on a certain url-pattern.
2) Let the servlet do the same work as jsp:usebean (check/instantiate a bean in the desired scope).
3) Either let the url-pattern cover the JSP page in question or let the servlet forward the request to the JSP page in question.
4) In the JSP page you can just access the bean using EL the usual way.
Joined: Apr 24, 2008
yes correct but my problem is in the last step as you mentioned
the error is
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 14 in the jsp file: /myshoppingcart.jsp
ShoppingBean cannot be resolved to a type
I guess in Jsp there is problem for accessing Bean.