Hi Madhav,
Thank you very much for you patient help. Now I got my server run, and I can test the TomCat and other test examples.
My next step is to get the BookStore example run, and I got a problem. When enter in browser the url:
http://localhost:8080/bookstore/enter, then I got an error 500:
Error: 500
Location: /bookstore/enter
Internal Servlet Error:
java.lang.NoSuchMethodError
at BookStoreServlet.service(BookStoreServlet.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
In BookStoreServlet.java, the 36 line is:
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher( //line 36
"/bookstore.html");
What's the problem could be?
In BookStore example, only the banner servlet works.
Also, I got a similar error when trying to load the catolog. This error occurs in line 57 of CatologServlet.java. THis line is:
ShoppingCart cart = (ShoppingCart)session.getAttribute("examples.bookstore.cart");
In HttpSession class, no getAttribute() method.
Could you help me to figure this out?
Thanks a lot.
Mike