File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how to get values in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to get values in "init-param"?" Watch "how to get values in "init-param"?" New topic

how to get values in "init-param"?

Hue Cheng

Joined: Aug 15, 2003
Posts: 8
For <context-params>,
I know it's using context.getInitParameter()
But for <servlet><init-param>
Is it using request.getParameter?
Thanks in advance!!
Detlev Beutner
Ranch Hand

Joined: Jul 13, 2001
Posts: 76
Hello Hue Cheng,
it's getInitParameter() on the ServletConfig object (retrievable via getServletConfig()).
Hope it helps
Hue Cheng

Joined: Aug 15, 2003
Posts: 8
so are you meanig that both <init-param> and <context-params> are retrivable via request.getInitParameter?
Thank you very much.
I agree. Here's the link:
subject: how to get values in "init-param"?
Similar Threads
Multiple Struts-config.xml in Jboss 4.2.1
wsdd urgent help Web Services
calling servlet from JSP
wsdd urgent help
java 1.5 ( generics and autoboxing) not working in Tomcat 5.5.9.