What is the main purpose of config implicit object in jsp?
As "servletConfig" facilitates to store name,value pairs(using <init-param> in web.xml for that particular servlet, is there any facility for jsp also?
I mean is there any facility to store name,value pairs in web.xml for using them in that particular jsp only?
pls clarify!!
-------------------- <br />SCJP 1.4<br />SCWCD 1.4<br />SCBCD 5(in progress)<br /> <br />"Do, what you think that you cannot do"
Mohd Fuzail
Ranch Hand
Joined: Feb 20, 2002
Posts: 107
posted
0
Did you noticed whom Head First Series - JSP is dedicated.....???
anyway coming to point "Config allows initialization data to be passed to a JSP page's servlet."
Being defeated is often a temporary condition. Giving up is what makes it permanent.
navat venu
Ranch Hand
Joined: May 14, 2006
Posts: 66
posted
0
shivani , can you please answer my query .
Shivani Chandna
Ranch Hand
Joined: Sep 18, 2004
Posts: 380
posted
0
Is there any facility to store name,value pairs in web.xml for using them in that particular jsp only?
Okay Navat , did you see in web.xml that <servlet> has <jsp-file> sub-element to it?. (Normally one mentions a <servlet-class> instead of jsp file)
For example:
Now in the above case , you can see how the init-param have been given to the JSP - Also you can see that settings like load-on-startup have been used for the JSP file - so that it is translated and compiled and loaded before any request has been made for it.
-----
Fuzail , config implicit object in JSP page is reference to ServletConfig instance. Whereas the initParam implicit EL object is a Map of context initialization paramateres/values. I think you mixed the two
Ah and for humor let me quote the "dedicated to" in HFJS.
This book is dedicated to whoever decided that the EL implicit object for a context param should be named initParam