Thread: context-param

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    12
    Rep Power
    0

    context-param


    I have several values stored in web.xml using the context-param tag:
    <context-param>
    <param-name>foo</param-name>
    <param-value>bar</param-name>
    </context-param>

    How do I retrieve these values with JSP at run time?
    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    Belarus
    Posts
    30
    Rep Power
    13
    Hi i.maizel

    One thing :
    String param = application.getInitParameter("foo");
    and
    application are (it defined in any jsp page default)

    ServletContext application = getServletConfig().getServletContext();

IMN logo majestic logo threadwatch logo seochat tools logo