java代码032

code033.jsp

<%@page import="java.util.Enumeration"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>获取web.xml中的配置</title>
</head>
<body>
<%
Enumeration enumeration1 = application.getInitParameterNames();
while(enumeration1.hasMoreElements())
{
    String name = enumeration1.nextElement().toString();
    String value = application.getInitParameter(name);
    out.println(name + ":");
    out.println(value);

}
%>

<%--
    在tomcat的web.xml配置文件中,增加如下配置:
    <context-param>
    <param-name>url</param-name>
    <param-value>jdbc:mysql://127.0.0.1:3306/test</param-value>
    </context-param>
    </web-app>
 --%>
</body>
</html>

评论

h
hw_7864

⭐️ Admin快速开发: https://show.cool-admin.com/

赞 0
h
hw_7864

⭐️ 官方文档: https://cool-js.com

赞 0
h
hw_7864

⭐️ chatgpt在线体验: https://cool-js.com/ai/chat-vip/index.html?r=helloworld

赞 0