Fixed a problem with the JDNI example index page, where an exception was thrown if the JDNI datasource was not found.

This commit is contained in:
Erik C. Thauvin 2004-03-23 00:19:49 +00:00
parent e449d82d2a
commit c35620ae6d
2 changed files with 8 additions and 2 deletions

View file

@ -13,7 +13,13 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<script language="javascript" type="text/javascript">
<% boolean enabled = (new InitialContext().lookup("java:comp/env/jdbc/JNDIPoolDS") != null); %>
<%
boolean enabled = false;
try {
enabled = (new InitialContext().lookup("java:comp/env/jdbc/JNDIPoolDS") != null);
} catch (Exception ignore) { }
%>
function RTFM()
{
alert("Please read the instructions to enable this example.");