wood burning stoves 2.0*
The moose likes Servlets and the fly likes how to access initial parameters from jsp..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to access initial parameters from jsp..?" Watch "how to access initial parameters from jsp..?" New topic
Author

how to access initial parameters from jsp..?

Prakash Chidambaram
Greenhorn

Joined: Oct 17, 2000
Posts: 7
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

Joined: Apr 06, 2001
Posts: 10
In Jsps you can access the initial parameters using the following scriplet
<% String parameter=application.getInitParameter("nameoftheparameter"); %>
Hope this helps
nirmal
Prakash Chidambaram
Greenhorn

Joined: Oct 17, 2000
Posts: 7
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to access initial parameters from jsp..?
 
Similar Threads
Accessing the Servlet Init parameters in jsp
tag file doubt
Passing a request object from a jsp to a frame within the same jsp
JSP(forward & sendredirect)
passing initial parameters to jsp