This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

implict object of jsp: "config"

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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."

For more information please refer More info on implicit objects
[ August 27, 2006: Message edited by: Mohd Fuzail ]
 
navat venu
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivani , can you please answer my query .
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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



Regards,
Shivani
[ August 26, 2006: Message edited by: Shivani Chandna ]
 
Mohd Fuzail
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My aplologies, yeah i mixed both of them....



Will take care with next posting..

thanks for updation
 
navat venu
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks shivani!!

you gave the exact answer.The code give by you is working fine.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic