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:
parent
e449d82d2a
commit
c35620ae6d
2 changed files with 8 additions and 2 deletions
|
@ -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.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue