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-Type" content="text/html;charset=UTF-8" />
|
||||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||||
<script language="javascript" type="text/javascript">
|
<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()
|
function RTFM()
|
||||||
{
|
{
|
||||||
alert("Please read the instructions to enable this example.");
|
alert("Please read the instructions to enable this example.");
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
<li>The <code class="info">maxCheckoutSeconds</code> initialization parameter is used to specify the maximum time a connection can be checked out before being recycled. A zero value turns this option off.</li>
|
<li>The <code class="info">maxCheckoutSeconds</code> initialization parameter is used to specify the maximum time a connection can be checked out before being recycled. A zero value turns this option off.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Please note that <em>all parameters are required</em>.</p>
|
<p>Please note that <em>all parameters are required</em>.</p>
|
||||||
<p class="alert">Please take a minute to uncomment the <code><servlet/></code> declaration and configure the Servlet's initialization parameters in this webapp's <code>WEB-INF/web.xml</code>. Once done, please restart the webapp and/or Tomcat. The examples will be functional upon restart.</p>
|
<p class="alert">Please take a minute to uncomment the <code><servlet/></code> declaration and configure the Servlet's initialization parameters in this webapp's <code><a href="../source.jsp?file=WEB-INF/web.xml">WEB-INF/web.xml</a></code>. Once done, please restart the webapp and/or Tomcat. The examples will be functional upon restart.</p>
|
||||||
<p>Please look at the [source] of the provided examples to understand how to access the connection pool from a scriptlet or using the JSTL SQL tags. The examples demonstrates how to list all of the tables contained in the specified database.</p>
|
<p>Please look at the [source] of the provided examples to understand how to access the connection pool from a scriptlet or using the JSTL SQL tags. The examples demonstrates how to list all of the tables contained in the specified database.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue