I have just started with JSP today and created the first JSP page.
However , it is not providing the output as expected . Here's the source code
Please help me find the errors ..
Any other resources /information regarding JSP will be appreciated. thanks
The use of Java code in scriptlets in a JSP has been discredited since 2002 (10 years ago! ) and is no longer acceptable. you should find a tutorial or other learning materials that emphasize the JSTL (JSP Standard Tag Library) and the EL (Expression Language).
I also recommend that JSP novices read the following articles:
As far as HTML indenting is concerned , I will learn that too. Thanks
Bear Bibeault wrote:What tutorial are you using that led you up to the point that you were able to write the code of your initial post? If it does not talk about JSTL and EL, then it is either very old and antiquated, or just a bad one.
Any (good) modern tutorial on JSP will cover JSTL and EL.
I read that code from an e-book on Java Servlets(don't remember the name). It has not mentioned a thing about JSTL or EL in the beginning . Do you know any good books/e-books to start with ?
Be aware that even modern books on JSP are likely to cover scriptlets -- knowledge of them may be needed to work on legacy web apps. But scriptlets should never be used in new pages.