Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to access initial parameters from jsp..?

 
Prakash Chidambaram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,
In Servlets, we can access the initial parameters specified in the web.xml using the getServletConfig().getInitParameter("xyz")
But, I am unable to access the initial parameters from a JSP page. Please do help me in this regard.

Thanks in advance,
prakash.
 
nirmal baba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Jsps you can access the initial parameters using the following scriplet
<% String parameter=application.getInitParameter("nameoftheparameter"); %>
Hope this helps
nirmal
 
Prakash Chidambaram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friend,
Thanks a lot for your reply. But i tried the same to my jsp pages hosted at www.webappcabaret.com. But they just return only Null as result. Could you let me know whether the above mentioned site supports getInitParameter() method.

With Regards,
Prakash.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic