| Author |
Why is there no EL implicit object for Servlet Init Params?
|
Ryan Day
Ranch Hand
Joined: Apr 03, 2006
Posts: 87
|
|
Can someone explain how you would get access to the Servlet init parameters in a JSP page using the JSP implicit variables or EL implicit variables? I'm a little confused why EL has the initParam map to get the Context Parameters, but nothing similar for Servlet Init Parameters. It makes me think I may be missing an important concept somewhere. After all, aren't you able to configure a JSP file with Servlet init parameters with the following DD configuration? <servlet> <servlet-name>JSPWithParameters</servlet-name> <jsp-file>MyJSP.jsp</jsp-file> <init-param> <param-name>PageTitle</param-name> <param-value>Welcome to this page!</param-value> </init-param> </servlet>
|
SCJP, SCWCD
|
 |
Hendy Setyo Mulyo
Ranch Hand
Joined: Dec 01, 2004
Posts: 219
|
|
Hi Ryan, You can check the FAQ: http://faq.javaranch.com/view?InitParamsThruExpressionLanguage It explain how to access servlet init parameters using EL.
|
Hendy Setyo Mulyo
SCJP 1.4 (95%), SCWCD 1.4 (94%)
|
 |
Ryan Day
Ranch Hand
Joined: Apr 03, 2006
Posts: 87
|
|
|
Thanks Hendy. I can't help wondering why they didn't include a map of the Servlet init params as an implicit EL object...
|
 |
 |
|
|
subject: Why is there no EL implicit object for Servlet Init Params?
|
|
|