Debian Codegraph @

tests/test-webapps/test-jndi-webapp/src/main/webapp/index.html

raw
1 <HTML>
2 <HEAD>
3 <TITLE>JNDI Test WebApp</TITLE>
4 <META http-equiv="Pragma" content="no-cache">
5 <META http-equiv="Cache-Control" content="no-cache,no-store">
6 <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
7 </HEAD>
8 <BODY>
9 <A HREF="https://www.eclipse.org/jetty"><IMG SRC="images/jetty_banner.gif"></A>
10 <br/>
11 <b><a href="http://localhost:8080/">Demo Home</a></b>
12 <hr/>
13 <center><span style="color:red; font-variant:small-caps; font-weight:bold">Test Web Application Only - Do NOT Deploy in Production</span> </center>
14
15 <h1>JNDI Test WebApp</h1>
16
17 <p>
18 This example shows how to configure and lookup resources such as DataSources, a JTA transaction manager and a java.mail.Session in JNDI.
19 </p>
20
21 <h2>Preparation</h2>
22 <p>To enable JNDI in a base jetty instance do:
23 <pre>
24 $ cd $JETTY_BASE
25 $ java -jar $JETTY_HOME/start.jar --add-to-startd=jndi
26 </pre>
27 </p>
28 <p>This will create a $JETTY_BASE/start.d/jndi.ini file to enable and parameterise JNDI. If the --add-to-start option instead, then the same initialisation will be appended to the
29 $JETTY_BASE/start.ini file instead. The jetty demo-base already has JNDI enabled in the start.ini file and some mock resources included. </p>
30 <p>The full source of this demonstration is available <a href="https://github.com/jetty/jetty.project/tree/jetty-9.4.x/tests/test-webapps/test-jndi-webapp">here</a>.</p>
31
32
33 <h2>Execution</h2>
34 <p>
35 Click <code>Test</code> to check the runtime lookup of the JNDI resources.
36 </p>
37 <form action="test" method="post">
38 <button type="submit">Test</button>
39 </form>
40
41
42 <hr/>
43 <center><a href="https://jetty.org/"><img style="border:0" src="images/small_powered_by.gif"/></a></center>
44
45 </BODY>
46 </HTML>