Skip to content

Instantly share code, notes, and snippets.

@aliencode
Last active December 18, 2015 11:58
Show Gist options
  • Save aliencode/5779013 to your computer and use it in GitHub Desktop.
Save aliencode/5779013 to your computer and use it in GitHub Desktop.
获取web.xml里的context-param配置

##web.xml:

    <context-param>
        <param-name>email</param-name>
        <param-value>[email protected]</param-value>
    <context-param>

##java:

    String email= getServletContext().getInitParameter("email");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment