Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

is there any such thing as jspServletConfig  RSS feed

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i couldnt find anything like this in the specs
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it probably does not exist.

What exactly do you mean by jspServletConfig ?
 
Ranch Hand
Posts: 128
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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}

     
    Keith Flo
    Ranch Hand
    Posts: 128
    Android Eclipse IDE Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 154
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 128
    Android Eclipse IDE Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yeah .. it is huge! ... I take the test on April 6th ...
     
    Ranch Hand
    Posts: 72
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    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
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!