| Author |
is there any such thing as jspServletConfig
|
Ankur Jain Kothari
Ranch Hand
Joined: Feb 08, 2010
Posts: 152
|
|
|
i couldnt find anything like this in the specs
|
Do What You Wanna Be....Taking Things The Way They Come
scjp 1.6 91 percent, scmad 90 percent(rounded off to nearest integer)
|
 |
Sebastian Janisch
Ranch Hand
Joined: Feb 23, 2009
Posts: 1173
|
|
Then it probably does not exist.
What exactly do you mean by jspServletConfig ?
|
JDBCSupport - An easy to use, light-weight JDBC framework -
|
 |
Keith Flo
Ranch Hand
Joined: Nov 29, 2005
Posts: 126
|
|
You must be thinking of ServletConfig? and wondering how to get the 'config' of a JSP page .... correct?
ServletConfig is mostly helpful because its a way to set/get init parameters for a servlet(s) in your app. To get/set init parameters for a JSP you cam either ...
use a scoped attribute (this is mentioned somewhere in the spec) like so ...
or use a context init parameter
- define the param in the DD and you can retrieve it in your JSP pages with EL like so ...
- ${initParam.paramname}
|
kf
SCJP 5.0 (preparing for SCWCD)
|
 |
Keith Flo
Ranch Hand
Joined: Nov 29, 2005
Posts: 126
|
|
One other point ...
Its easy to confuse the methods needed to get the init params in servlet code ...
To get the servlet init params use ...
To get the context (think application) init params use ...
Context for context (application) params .... Config for servlet params ...
|
 |
Ankur Jain Kothari
Ranch Hand
Joined: Feb 08, 2010
Posts: 152
|
|
actually in one of the hfsj questions there was an option of jspServletConfig....so was wondering if such a thing existed....nevertheless thanks a lot....scwcd is huge..i was hoping to give the exam on 5th april...but now will go for may 17th or something....
|
 |
Keith Flo
Ranch Hand
Joined: Nov 29, 2005
Posts: 126
|
|
|
Yeah .. it is huge! ... I take the test on April 6th ...
|
 |
Swagato Bhatta
Ranch Hand
Joined: Nov 08, 2008
Posts: 72
|
|
Ankur Jain Kothari wrote:actually in one of the hfsj questions there was an option of jspServletConfig....so was wondering if such a thing existed....nevertheless thanks a lot....scwcd is huge..i was hoping to give the exam on 5th april...but now will go for may 17th or something....
SCWCD is just like a black hole. Once you start, it just do not seem to end! Neverending studies
|
Working on my SCWCD so I can be a J2EE consultant earning millions of dollars and showing everyone I can
|
 |
 |
|
|
subject: is there any such thing as jspServletConfig
|
|
|