This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hello guys, how do i read an init parameter in a web.xml from a JSP page . All ideas are welcome. I know to do it from a servlet : getServletContext().getInitParameter("paramName"); All idea are welcomed....
arul murug
Greenhorn
Joined: Aug 08, 2002
Posts: 24
posted
0
You can use the same way as getServletContext().getInitParameter("paramName") after all JSPs are converted to servlets. or more aptly you can use application.getInitParameter( "parameterName" );
SCJP2<br />SCWCD<br />UML & OOAD - IBM 486
Gabriel Fox
Ranch Hand
Joined: Oct 17, 2001
Posts: 170
posted
0
Thanks, i was just trying to over complicate the solution.
Srini Gogineni
Greenhorn
Joined: May 19, 2003
Posts: 7
posted
0
Originally posted by Gabriel Fox: Hello guys, how do i read an init parameter in a web.xml from a JSP page . All ideas are welcome. I know to do it from a servlet : getServletContext().getInitParameter("paramName"); All idea are welcomed....
hi, define the init param in web.xml(in approot/WEB-INF) as <context-param> <param-name>CompanyName</param-name> <param-value>Temasek Poly</param-value> </context-param> access using String value = getServletContext().getInitParameter("CompanyName");