?? jsp入門教程(2).html
字號:
| <a href="Info-85-Time-DESC-1.html">Flash</a>
| <a href="Info-86-Time-DESC-1.html">Fireworks</a>
| <a href="Info-101-Time-DESC-1.html">Photoshop</a></div>
<!-- 搜索部分 -->
<div id="middle_2">
<form name=myform action="../ArSearch.php" method="post">
<div id="search1">
<strong>站內(nèi)搜索</strong>: <input type="text" size="14" maxlength="20" name="Keyword" />
<input src="../images/search.gif" type="image" value="submit" align="absmiddle" border="0"> <iframe marginheight=0 marginwidth=0 frameborder=0 width=350 height=22 scrolling=NO src="../Js/Welan.Search.html"></iframe></div></form></div>
<div id="main"><a href="index.html">站點首頁</a> → <a href="Info-ALL-Time-DESC-1.html">破釜學(xué)院</a> → <a href="Info-2-Time-DESC-1.html">編程開發(fā)</a> → <a href="Info-8-Time-DESC-1.html">Java</a> → <a href="Info-94-Time-DESC-1.html">JSP</a> → JSP入門教程(2)</div>
<script language="JavaScript">
function doZoom(size,line){
content.style.fontSize=size+'px';
content.style.lineHeight=line+'pt';
}
</script>
<!-- 列表部分 -->
<div id="middle_1">
<div id="list_art_right">
<div class="nav_left"><h6>¤ 推薦列表</h6></div>
<div class="text">
<script type="text/javascript" language="javascript" src="../Js/Sponsor/CommendList.Js"></script>
</div>
<!-- SiteSearch Google -->
<div class="nav_left"><h2>¤ Google搜索</h2></div>
<div id="right_serch"><form method="get" action="http://www.google.com/custom" target="google_window">
<input type="hidden" name="domains" value="www.7880.com" />
<input type="text" name="q" size="16" maxlength="255" value="" />
<input type="submit" name="sa" value="搜索" />
<input type="radio" name="sitesearch" value="" checked="checked" />Web
<input type="radio" name="sitesearch" value="www.7880.com" />站內(nèi)搜索
<input type="hidden" name="client" value="pub-2550567863210895" />
<input type="hidden" name="forid" value="1" />
<input type="hidden" name="channel" value="5668902811" />
<input type="hidden" name="ie" value="GB2312" />
<input type="hidden" name="oe" value="GB2312" />
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:170;L:http://www.7880.com/Template/Default/Images/logo.gif;S:http://www.7880.com;FORID:1;" />
<input type="hidden" name="hl" value="zh-CN" /></form></div>
<div class="nav_left"><h6>¤ 熱點資訊</h6></div>
<div class="read_top">
<ul>
<li>·<a href="Article-1247dee0.html" title="JDBC連接SQLServer2000">JDBC連接SQLServer20.</a></li><li>·<a href="Article-2ff8460.html" title="JSP入門教程(1)">JSP入門教程(1)</a></li><li>·<a href="Article-127111c0.html" title="jsp連接sql server調(diào)用數(shù)據(jù)源方法">jsp連接sql server調(diào).</a></li><li>·<a href="Article-4610b4e0.html" title="JSP學(xué)習(xí)筆記(二)-----使用Tomcat運行JSP文件">JSP學(xué)習(xí)筆記(二)----.</a></li><li>·<a href="Article-46248b00.html" title="JSP + JavaScript 實現(xiàn)類似 MSDN CSDN 導(dǎo)航樹效果!">JSP + JavaScript 實.</a></li><li>·<a href="Article-35032ac0.html" title="jspSmartUpload上傳下載全攻略">jspSmartUpload上傳下.</a></li><li>·<a href="Article-3ba26b20.html" title="JSP連接SQL Server 2000系統(tǒng)配置">JSP連接SQL Server 2.</a></li><li>·<a href="Article-4613c220.html" title="JSP學(xué)習(xí)筆記(三)-----使用JSP處理用戶注冊和登陸">JSP學(xué)習(xí)筆記(三)----.</a></li><li>·<a href="Article-461b6340.html" title="JSP學(xué)習(xí)筆記(九)-----JSP標(biāo)簽庫">JSP學(xué)習(xí)筆記(九)----.</a></li><li>·<a href="Article-4616cf60.html" title="JSP學(xué)習(xí)筆記(六)-----在多個JSP頁面之間傳遞參數(shù)">JSP學(xué)習(xí)筆記(六)----.</a></li><li>·<a href="Article-462611a0.html" title="Struts下JSP頁面?zhèn)鬟f復(fù)選框值技巧">Struts下JSP頁面?zhèn)鬟f.</a></li><li>·<a href="Article-3b518c0.html" title="Struts學(xué)習(xí)傻瓜式入門篇">Struts學(xué)習(xí)傻瓜式入門.</a></li><li>·<a href="Article-308ac20.html" title="JAVA/JSP學(xué)習(xí)系列之二(Tomcat安裝)">JAVA/JSP學(xué)習(xí)系列之二.</a></li><li>·<a href="Article-30291a0.html" title="JSP入門教程(3)">JSP入門教程(3)</a></li><li>·<a href="Article-3041840.html" title="JSP入門教程(4)">JSP入門教程(4)</a></li><li>·<a href="Article-36bdac0.html" title="JSP學(xué)習(xí)心得">JSP學(xué)習(xí)心得</a></li><li>·<a href="Article-460f2e40.html" title="JSP學(xué)習(xí)筆記(一)-----概述">JSP學(xué)習(xí)筆記(一)----.</a></li><li>·<a href="Article-3010b00.html" title="JSP入門教程(2)">JSP入門教程(2)</a></li><li>·<a href="Article-461548c0.html" title="JSP學(xué)習(xí)筆記(五)-----JSP中使用JavaBean">JSP學(xué)習(xí)筆記(五)----.</a></li><li>·<a href="Article-325aa00.html" title="jsp基礎(chǔ)學(xué)習(xí)資料">jsp基礎(chǔ)學(xué)習(xí)資料</a></li></ul>
</div></div>
<div id="list_art_left">
<div id="art_title">JSP入門教程(2)</div>
<div class="d2"><span class="d2_r">【<a href="javascript:doZoom(16,19)">大</a>
<a href="javascript:doZoom(14,17)">中</a> <a href="javascript:doZoom(12,15)">小</a>】【<a href="../Print.php?PID=6021600">打印</a>】【<a href="../Favorite.php?Go=Info::3010b00">加入收藏</a>】【<a href="javascript:window.close()">關(guān)閉</a>】</span>
【<a title=收藏的網(wǎng)頁將被永久地保存到新浪ViVi收藏夾http://vivi.sina.com.cn href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=2008&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();">收藏到新浪ViVi</A>】【<a title=功能強(qiáng)大的網(wǎng)絡(luò)收藏夾,一秒鐘操作就可以輕松實現(xiàn)保存帶來的價值、分享帶來的快樂 href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();">收藏到365KEY</a>】 瀏覽字號:</div>
<div class="d3">日期:2004-06-01 人氣:<script language="javascript" src="../Read.php?ID=3010b00"></script> 出處: <br />
<iframe marginheight=0 marginwidth=0 frameborder=0 width=468 height=60 scrolling=NO src="../Js/Google.html"></iframe></div>
<div id="content"><SPAN class=unnamed3>歡迎使用JavaServer Pages(以下簡稱JSP)技術(shù)—制作動態(tài)內(nèi)容網(wǎng)頁的方法。 <BR><BR>如果你希望學(xué)習(xí)這篇教程的話,我想你一定是這項技術(shù)的新手。你可能想成為一名利用JSP技術(shù)開發(fā)網(wǎng)絡(luò)應(yīng)用程序的程序員或者網(wǎng)頁設(shè)計師。本教程中包含了一系列JSP的技巧和一些簡單的代碼的寫法,每一步都舉了一組例子來講述原理。 <BR><BR>我建議你在學(xué)習(xí)本教程之前先去看一看FAQ,了解如果配置你的服務(wù)器好讓他能支持并運行JSP。那樣你就可以跳過前邊的內(nèi)容直接看你感興趣的內(nèi)容了。 <BR><BR>OK,費話少說,Let’s go! <BR><BR>第一課:真正的開始 <BR><BR>現(xiàn)在開始做我們的第一個JSP頁面。圖1-1展示了一個最簡單的JSP頁面,接下來是兩段代碼。 <BR><BR><BR><BR>[dukebanner.html] <BR><BR><table border=”0” width=”400” cellspacing=”0” cellpadding=”0”> <BR><BR><tr> <BR><BR><td height=”150” width=”150”> &nbsp; </td> <BR><BR><td width=”250”> &nbsp; </td> <BR><BR></tr> <BR><BR><tr> <BR><BR><td width=”150”> &nbsp; </td> <BR><BR><td align=”right” width=”250”> <BR><img src=”duke.waving.gif”></td></tr></table><br> <BR><BR><BR><BR>helloworld.jsp <BR><BR><%@ page info="a hello world example" %> <BR><BR><html> <BR><BR><head><title>Hello, World</title></head> <BR><BR><body bgcolor="#ffffff" background="background.gif"> <BR><BR><%@ include file="dukebanner.html" %> <BR><BR><table> <BR><BR><tr> <BR><BR><td width=150> &nbsp; </td> <BR><BR><td width=250 align=right> <h1>Hello, World!</h1> </td> <BR><BR></tr> <BR><BR></table> <BR><BR></body> <BR><BR></html> <BR><BR>頁面說明: <BR><BR>在很多JSP文件中你都要寫上這樣的說明。在helloword.jsp中: <BR><BR><%@ page info="a hello world example" %> <BR><BR>傻瓜也看得出來,這句話沒什么大用,只是簡要的說明一下這段代碼的作用。 <BR><BR>你可以在JSP文件中的任何地方寫這種代碼,但是好的習(xí)慣是把他寫在最前面,還有,因為他是JSP標(biāo)簽,記住一定要放在<html>前面,呵 <BR><BR>include說明: <BR><BR>include用來在主JSP文件中調(diào)用本地的一個其他文件,通常是一些版權(quán)信息啦,腳本語言啦等其他任何你想在其他文件中重復(fù)使用的代碼。在這個例子中就是調(diào)用了一個圖片其實。大家明白這個意思就得了。 <BR><BR>隨便說兩句: <BR><BR>在JSP中對寫法非常敏感,不可以有一點錯誤。舉個例子,把<jsp:useBean>寫成<jsp:usebean>那樣服務(wù)器會出現(xiàn)錯誤信息。一些如類名,包名,路徑名還有其他的敏感的標(biāo)簽等千萬不要寫錯。有一些JSP標(biāo)簽?zāi)貌粶?zhǔn)的話就去查一下JavaServer Pages語法卡片。 <BR><BR>代碼寫好了,如何試驗一下呢? <BR><BR>我這里寫的UNIX下的方法,如果你用Windows,那么換一下路徑就可以了 <BR><BR>1、 先建一個目錄:../jswdk-1.0/examples/jsp/tutorial/helloworld <BR><BR>2、 把這些文件拷過去background.gif, duke.waving.gif, dukebanner.html, and helloworld.jsp <BR><BR>3、 cd ../jswdk-1.0,然后startserver <BR><BR>4、 開一個瀏覽器, <BR><BR>5、 http://yourMachineName:8080/examples/jsp/tutorial/helloworld/helloworld.jsp> <BR></SPAN></div>
<div class="viewpage"> </div>
<p><a href="http://bbs.7880.com">>>>> 進(jìn)入論壇交流 <<<<</a></p>
<div id="d4"><span class="d5">相關(guān)文章:</span><br /><li><a href="Article-3041840.html">JSP入門教程(4)</a></li><li><a href="Article-30291a0.html">JSP入門教程(3)</a></li><li><a href="Article-2ff8460.html">JSP入門教程(1)</a></li></div></div></div>
<!-- left -->
<!-- 尾部 包括:友情鏈接 + 版權(quán)聲明 -->
<div id="middle_7">
<div id="footer">
<a href="../Site.php?About">關(guān)于我們</a> | <a href="../Site.php?AD">廣告聯(lián)系</a> | <a href="../Site.php?Help" class="help">幫助(?) </a>| <a href="../Site.php?Copyright">版權(quán)聲明</a> | <a href="../Site.php?Link">友情鏈接</a> | <a href="../Site.php?Contact">聯(lián)系我們</a> | <a href="#" title="破釜沉舟: 源碼下載,素材下載,為網(wǎng)站站長.設(shè)計師.編程開發(fā)者. 提供資源!" onclick="window.external.addfavorite('http://www.7880.com','破釜沉舟: 源碼下載,素材下載,為網(wǎng)站站長.設(shè)計師.編程開發(fā)者. 提供資源!')">加入收藏</a>
</div>
<div id="copyright">Copyright 2004-2005 <a href="http://www.7880.com">www.7880.com</a> Inc. All rights reserved.
<script language="javascript" type="text/javascript" src="http://js.b.dx03.51.la/1618.js"></script>
</div></div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -