Can you please tell me why my init parameter, "email" is not coming correctly in line 1, as i configured it in line2 and line 3
anyone can you correct me so i can get the value for "email" correctly?
Iam a beginner in jsp.
This message was edited 1 time. Last update was at by Anuradha Prasanna
SCJP 6.0 90%
Bear Bibeault
Author and opinionated walrus
Marshal
Also this line is not guaranteed to run ServletContext ctx = getServletContext(); because your jsp page extend a servlet that implements HttpJspPage interface which extends Servlet interface.
In all those hierarchy like HttpSJspPage and Servlet interface there is no method called getServletContext().So it is better if you get the context using ServletContext contex=getServletConfig().getServletContext().
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
Anuradha Prasanna
Ranch Hand
Joined: Mar 09, 2006
Posts: 114
posted
0
Iam learning jsp from "Head First Servlets & JSP" by "Bryan Basham, Kathy Sierra & Bert Bates"
Actually, chapter 7 focus on basic JSP, then next chapters comes the Scriptless JSP, JSTL and Custom Tag development, as iam in chapter 7, i was just doing the exercise given in that chapter, according to the book, i should get the correct output for the above codes. But iam not getting.
So i turned to help in the JSP forum
I know my JSP is outdated, soon i will learn the latest one.
Meanwhile can anyone modify the code above and tell me how to configure init parameters for your jsp and access the init parameters in your jsp, using the latest JSP(without java code)?
This message was edited 1 time. Last update was at by Anuradha Prasanna
Bear Bibeault
Author and opinionated walrus
Marshal