Anybody who read the book "Head First Servlet & JSP". In Chapter 3 "Hands on MVC" they prepare the first website with JSP & servlet. I write the exact code written in book Upto version 2 servlet the code runs fine. But in version 3 servlet when JSP introduced the final codes become as follows:
But during run when submitting query, it opens the link "http://localhost:8080/Beer-v2/SelectBeer.do"
but with following error
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
This line stops the JVM from telling what is going wrong when an IOException is thrown. You should either throw the exception up to the container to handle or, if you're not going to do that, at a minimum, log what's going on.
[ November 11, 2007: Message edited by: Ben Souther ]
Thing you need to understand is that JSP are not compiled until they run, so that makes this sort of thing a pain in the butt.
Just do this... if you using netbeans, right click on the JSP page itself and compile it... it will take you to the line of code. Then just right click on that and look at the JavaDocs... add the class it wants to your imports.
As of JSP 2.0 the EL and JSTL are separate, with the EL being part of JSP. There should be no need to hunt down and add jars to support the EL. If the container doesn't have the required jars, it either doesn't support JSP 2.0 or the installation has been corrupted.
Do you have an older j2ee.jar in your JDK directory structure somewhere?
Joined: Nov 03, 2007
Thanks all for replying my queries. There is an error in Tomcat 6.0.13 installation. I have installed this tomcat comes with the package of Netbeans 6.0. That code < is not in the book. I have written as I also tried this project to run from Netbeans. In the line it reports that it should declared or caught. That's why I add this extra.
That apache Tomcat has some kind of error. It cannot process any JSP files( even webapps\examples). I discovered it at last at late night after severe brainstorming. . I installed another version of Tomcat 6.0.14 and runs my applicaton. It runs fine now. Sorry to bother you all.