⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsptags3.html

📁 j2eePDF格式的电子书
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</ol></div><a name="wp92236"> </a><div class="pSmartList1"><li>Define the Web component.</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92237"> </a><div class="pSmartList2"><li>Click Next.</li></div><a name="wp92238"> </a><div class="pSmartList2"><li>Select the Servlet radio button. </li></div><a name="wp92239"> </a><div class="pSmartList2"><li>Click Next.</li></div><a name="wp92240"> </a><div class="pSmartList2"><li>Select <code class="cCode">dispatcher.Dispatcher</code> from the Servlet class combo box. </li></div><a name="wp92241"> </a><div class="pSmartList2"><li>Click Finish.</li></div></ol></div><a name="wp92242"> </a><div class="pSmartList1"><li>In the Deployment Setting frame, set the Context Root field value to <code class="cCode">/bookstore3</code>.</li></div><a name="wp92741"> </a><div class="pSmartList1"><li>Add the listener class <code class="cCode">listeners.ContextListener</code> (described in <a  href="Servlets4.html#wp64218">Handling Servlet Life Cycle Events</a>).</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92743"> </a><div class="pSmartList2"><li>Select the Event Listeners tab.</li></div><a name="wp92744"> </a><div class="pSmartList2"><li>Click Add.</li></div><a name="wp92745"> </a><div class="pSmartList2"><li>Select the <code class="cCode">listeners.ContextListener</code> class from drop down field in the Event Listener Classes panel.</li></div></ol></div><a name="wp92243"> </a><div class="pSmartList1"><li>Add the aliases.</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92244"> </a><div class="pSmartList2"><li>Select <code class="cCode">Dispatcher</code>.</li></div><a name="wp92245"> </a><div class="pSmartList2"><li>Select the Aliases tab.</li></div><a name="wp92246"> </a><div class="pSmartList2"><li>Click Add and then type <code class="cCode">/bookstore</code> in the <code class="cCode">Aliases</code> field. Repeat to add the aliases <code class="cCode">/bookcatalog</code>, <code class="cCode">/bookdetails</code>, <code class="cCode">/bookshowcart</code>, <code class="cCode">/bookcashier</code>, /<code class="cCode">bookordererror,</code> and <code class="cCode">/bookreceipt</code>.</li></div></ol></div><a name="wp92247"> </a><div class="pSmartList1"><li>Add the JSTL resource bundle basename context parameter.</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92248"> </a><div class="pSmartList2"><li>Select the Web module.</li></div><a name="wp92249"> </a><div class="pSmartList2"><li>Select the Context tab. </li></div><a name="wp92250"> </a><div class="pSmartList2"><li>Click Add.</li></div><a name="wp92251"> </a><div class="pSmartList2"><li>Enter <code class="cCode">javax.servlet.jsp.jstl.fmt.localizationContext</code> for the Coded Parameter.</li></div><a name="wp92252"> </a><div class="pSmartList2"><li>Enter <code class="cCode">messages.BookstoreMessages</code> for the Value.</li></div></ol></div><a name="wp92253"> </a><div class="pSmartList1"><li>Set prelude for all JSP pages.</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92254"> </a><div class="pSmartList2"><li>Select the JSP Properties tab.</li></div><a name="wp92255"> </a><div class="pSmartList2"><li>Click the Add button next to the Name list.</li></div><a name="wp92256"> </a><div class="pSmartList2"><li>Enter <code class="cCode">bookstore3</code>.</li></div><a name="wp92257"> </a><div class="pSmartList2"><li>Click the Add button next to the URL Pattern list.</li></div><a name="wp92258"> </a><div class="pSmartList2"><li>Enter <code class="cCode">*.jsp</code>.</li></div><a name="wp92259"> </a><div class="pSmartList2"><li>Click the Edit button next to the Include Preludes list.</li></div><a name="wp92260"> </a><div class="pSmartList2"><li>Click Add.</li></div><a name="wp92261"> </a><div class="pSmartList2"><li>Enter <code class="cCode">/template/prelude.jspf</code>.</li></div><a name="wp92262"> </a><div class="pSmartList2"><li>Click OK.</li></div></ol></div><a name="wp92263"> </a><div class="pSmartList1"><li>Add a resource reference for the database.</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92264"> </a><div class="pSmartList2"><li>Select the Resource Refs tab.</li></div><a name="wp92265"> </a><div class="pSmartList2"><li>Click Add.</li></div><a name="wp92266"> </a><div class="pSmartList2"><li>Enter <code class="cCode">jdbc/BookDB</code> in the Coded Name field.</li></div><a name="wp92267"> </a><div class="pSmartList2"><li>Accept the default type <code class="cCode">javax.sql.DataSource</code>.</li></div><a name="wp92268"> </a><div class="pSmartList2"><li>Accept the default authorization <code class="cCode">Container</code>.</li></div><a name="wp92269"> </a><div class="pSmartList2"><li>Accept the default selected <code class="cCode">Shareable</code>.</li></div><a name="wp92270"> </a><div class="pSmartList2"><li>Enter <code class="cCode">jdbc/BookDB</code> in the JNDI name field of the Sun-specific Settings frame.</li></div></ol></div><a name="wp92271"> </a><div class="pSmartList1"><li>Deploy the application. </li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp92272"> </a><div class="pSmartList2"><li>Select Tools<span style="font-family: Symbol"><img src="images/arrwrite.gif" border="0" alt="Right Arrow"></span>Deploy. </li></div><a name="wp92273"> </a><div class="pSmartList2"><li>Click OK.</li></div><a name="wp92274"> </a><div class="pSmartList2"><li>A popup dialog will display the results of the deployment. Click Close.</li></div></ol></div><a name="wp89563"> </a><div class="pSmartList1"><li>Open the bookstore URL <br /><code class="cCode">http://localhost:8080/bookstore3/bookstore</code>.</li></div></ol></div><a name="wp89567"> </a><p class="pBody">See <a  href="Servlets3.html#wp71209">Troubleshooting</a> for help with diagnosing common problems.</p>    </blockquote>   <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider">    <table width="550" summary="layout" id="SummaryNotReq1">      <tr>	<td align="left" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a>	</td>        <td align="center" valign="center"><a accesskey="p" href="JSPTags2.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JSPTags4.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a>        </td>	<td align="right" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font>	</font>	</td>      </tr>    </table>    <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"><p><font size="-1">All of the material in <em>The J2EE(TM) 1.4 Tutorial</em> is <a href="J2EETutorialFront2.html">copyright</a>-protected and may not be published in other workswithout express written permission from Sun Microsystems.</font>  </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -