apple0668
TDD,Agile,Scrum,Core Java,J2EE,Investment Blank
BlogJava
首頁
新隨筆
聚合
管理
隨筆-61 評(píng)論-159 文章-0 trackbacks-0
struts2中head標(biāo)簽的使用
在struts2中的jsp文件使用<s:head/>可以得到一些加入js的效果
login.jsp
<%@ page language="java" contentType="text/html; charset=GBK"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>登錄頁面</title>
<s:head/>
</head>
<body>
<s:form action="Login.action" method="post">
<s:textfield name="name" label="用戶名"/>
<s:password name="password" label="密碼"/>
<s:submit value="登錄"/>
</s:form>
</body>
</html>
1、輸入:
http://localhost:8080/strutsdemo/login.jsp
2、得到:
沒有加<head/>時(shí)候得到
加<s:head/>后,瀏覽器源文件代碼
1
<
html
>
2
<
head
>
3
<
title
>
??¼???
</
title
>
4
<
link
rel
="stylesheet"
href
="/strutsdemo/struts/xhtml/styles.css"
type
="text/css"
/>
5
<
script
type
="text/javascript"
>
6
//
Dojo configuration
7
djConfig
=
{
8
baseRelativePath:
"
/strutsdemo/struts/dojo
"
,
9
isDebug:
false
,
10
bindEncoding:
"
UTF-8
"
,
11
debugAtAllCosts:
true
//
not needed, but allows the Venkman debugger to work with the includes
12
}
;
13
</
script
>
14
<
script
type
="text/javascript"
15
src
="/strutsdemo/struts/dojo/dojo.js"
></
script
>
16
<
script
type
="text/javascript"
17
src
="/strutsdemo/struts/simple/dojoRequire.js"
></
script
>
18
19
</
head
>
20
<
body
>
21
22
<
form
id
="Login"
onsubmit
="return true;"
action
="Login.action"
method
="post"
>
23
<
table
class
="wwFormTable"
>
24
<
tr
>
25
<
td
class
="tdLabel"
><
label
for
="Login_name"
class
="label"
>
?û???:
</
label
></
td
>
26
<
td
27
><
input
type
="text"
name
="name"
value
=""
id
="Login_name"
/>
28
</
td
>
29
</
tr
>
30
31
<
tr
>
32
<
td
class
="tdLabel"
><
label
for
="Login_password"
class
="label"
>
????:
</
label
></
td
>
33
<
td
34
><
input
type
="password"
name
="password"
id
="Login_password"
/>
35
</
td
>
36
</
tr
>
37
38
<
tr
>
39
<
td
colspan
="2"
><
div
align
="right"
><
input
type
="submit"
id
="Login_0"
value
="??¼"
/>
40
</
div
></
td
>
41
</
tr
>
42
43
</
table
></
form
>
44
45
</
body
>
46
</
html
>
47
3、由于加入了validation校驗(yàn)框架,在沒有輸入用戶名跟密碼時(shí)候,按登錄產(chǎn)生一下界面
瀏覽器的源代碼:
1
<
html
>
2
<
head
>
3
<
title
>
登錄頁面
</
title
>
4
<
link
rel
="stylesheet"
href
="/strutsdemo/struts/xhtml/styles.css"
type
="text/css"
/>
5
<
script
type
="text/javascript"
>
6
//
Dojo configuration
7
djConfig
=
{
8
baseRelativePath:
"
/strutsdemo/struts/dojo
"
,
9
isDebug:
false
,
10
bindEncoding:
"
UTF-8
"
,
11
debugAtAllCosts:
true
//
not needed, but allows the Venkman debugger to work with the includes
12
}
;
13
</
script
>
14
<
script
type
="text/javascript"
15
src
="/strutsdemo/struts/dojo/dojo.js"
></
script
>
16
<
script
type
="text/javascript"
17
src
="/strutsdemo/struts/simple/dojoRequire.js"
></
script
>
18
19
</
head
>
20
<
body
>
21
22
<
form
id
="Login"
onsubmit
="return true;"
action
="Login.action"
method
="post"
>
23
<
table
class
="wwFormTable"
>
24
<
tr
errorFor
="Login_name"
>
25
<
td
align
="center"
valign
="top"
colspan
="2"
><
span
class
="errorMessage"
>
用戶名必填
</
span
></
td
>
26
</
tr
>
27
<
tr
>
28
<
td
class
="tdLabel"
><
label
for
="Login_name"
class
="errorLabel"
>
用戶名:
</
label
></
td
>
29
<
td
30
><
input
type
="text"
name
="name"
value
=""
id
="Login_name"
/>
31
</
td
>
32
</
tr
>
33
34
<
tr
errorFor
="Login_password"
>
35
<
td
align
="center"
valign
="top"
colspan
="2"
><
span
class
="errorMessage"
>
密碼必填
</
span
></
td
>
36
</
tr
>
37
<
tr
>
38
<
td
class
="tdLabel"
><
label
for
="Login_password"
class
="errorLabel"
>
密碼:
</
label
></
td
>
39
<
td
40
><
input
type
="password"
name
="password"
id
="Login_password"
/>
41
</
td
>
42
</
tr
>
43
44
<
tr
>
45
<
td
colspan
="2"
><
div
align
="right"
><
input
type
="submit"
id
="Login_0"
value
="登錄"
/>
46
</
div
></
td
>
47
</
tr
>
48
49
50
</
table
></
form
>
51
52
53
54
55
</
body
>
56
</
html
>
-------------------------------------------------------------------------------------------------
PS:本博客文章,如果沒有注明是有“轉(zhuǎn)”字樣,屬于本人原創(chuàng)。如果需要轉(zhuǎn)載,務(wù)必
注明作者
和
文章的詳細(xì)出處地址
,否則不允許轉(zhuǎn)載,多謝合作!
posted on 2007-11-02 20:37
apple0668
閱讀(4540)
評(píng)論(1)
編輯
收藏
所屬分類:
struts2
評(píng)論:
#
re: struts2中head標(biāo)簽的使用
2008-01-03 17:33 |
ElgooG
thanks,
回復(fù)
更多評(píng)論
新用戶注冊(cè)
刷新評(píng)論列表
只有注冊(cè)用戶
登錄
后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
相關(guān)文章:
struts2設(shè)置開發(fā)模式控制臺(tái)錯(cuò)誤信息
深入struts2中validation校驗(yàn)框架的原理和使用(二)
深入struts2中validation校驗(yàn)框架的原理和使用(一)
struts2中action和field級(jí)別錯(cuò)誤處理
eclipse的第一個(gè)struts2插件:Alveole Studio MVC Web Project An eclipse plugin for Struts 2
ssh2中采用dao---service---action分層結(jié)構(gòu)
struts2中head標(biāo)簽的使用
struts2中命名空間的使用
Email:
chensp1230@163.com
歡迎交流
框架是告訴人們不該去做什么,而不是告訴人們?cè)撊プ鍪裁矗蝗萜魇歉嬖V人們?cè)撊プ鍪裁矗皇歉嬖V人們不該去做什么!
<
2008年1月
>
日
一
二
三
四
五
六
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
留言簿
(10)
給我留言
查看公開留言
查看私人留言
我參與的團(tuán)隊(duì)
深圳Java俱樂部(0/0)
Netbeans 愛好者(0/0)
隨筆分類
(63)
Aglets(1)
drools(2)
eclipse(6)
groovy
hibernate(17)
java(7)
jboss
junit(3)
Log4(2)
MongoDB(1)
oracle(1)
spring(4)
struts2(8)
svn(1)
tomcat(4)
webwork(4)
web報(bào)表(1)
xml
心情港灣
集群(1)
隨筆檔案
(61)
2015年3月 (1)
2012年7月 (1)
2012年4月 (1)
2011年5月 (3)
2010年1月 (2)
2009年3月 (1)
2008年12月 (2)
2008年11月 (5)
2008年10月 (16)
2008年9月 (1)
2008年4月 (1)
2008年1月 (2)
2007年11月 (2)
2007年10月 (15)
2007年9月 (8)
友情鏈接
開源在線手冊(cè)
最新隨筆
1.?Ehcache集群方案
2.?MongoDB安裝手記
3.?任何人都可以重構(gòu)<轉(zhuǎn)載>
4.?JDK6中JWS自帶webservice應(yīng)用
5.?解決:Eclipse啟動(dòng)tomcat 訪問不了 手動(dòng)啟動(dòng)可以訪問
6.?IntelliJ Idea10 常用快捷鍵
7.?Drools語法詳解<轉(zhuǎn)>
8.?eclipse3.4安裝drools插件手記
9.?Java日期時(shí)間運(yùn)算
10.?java中使用功能強(qiáng)悍的正則表達(dá)式
搜索
最新評(píng)論
1.?re: Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記
非常感謝樓主分享,解決問題, Tomcat 7.0.59
--Gozs
2.?re: Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記[未登錄]
正解
--gao
3.?re: Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記
@123
已解決,謝謝提示myeclipse相關(guān)的有用信息~~
--sequoah
4.?re: Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記
贊 清空work文件夾就可以了
--維尼
5.?re: Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記
很好 問題解決了!
--兔兔
閱讀排行榜
1.?Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記(85541)
2.?系統(tǒng)學(xué)習(xí)hibernate之一:利用hibernate中的SchemaExport生成數(shù)據(jù)表(18641)
3.?eclipse的第一個(gè)struts2插件:Alveole Studio MVC Web Project An eclipse plugin for Struts 2(15692)
4.?Subversion之路---實(shí)現(xiàn)精細(xì)的目錄訪問權(quán)限控制<轉(zhuǎn)>(11308)
5.?IntelliJ Idea10 常用快捷鍵(9321)
評(píng)論排行榜
1.?Tomcat:IOException while loading persisted sessions: java.io.EOFException解決手記(62)
2.?eclipse的第一個(gè)struts2插件:Alveole Studio MVC Web Project An eclipse plugin for Struts 2(32)
3.?Tomcat啟動(dòng)端口被占用異常處理(9)
4.?升級(jí)瑞星防火墻2008后,在myeclipse6.0中啟動(dòng)tomcat遇到怪問題!(7)
5.?JDK6中JWS自帶webservice應(yīng)用(6)
Powered by:
博客園
模板提供:
滬江博客
Copyright ©2025 apple0668
主站蜘蛛池模板:
亚洲熟伦熟女专区hd高清
|
免费人成大片在线观看播放电影
|
亚洲国产日韩在线
|
日本xxxx色视频在线观看免费
|
亚洲毛片无码专区亚洲乱
|
精品一区二区三区免费毛片爱
|
成人免费午夜无码视频
|
亚洲一级Av无码毛片久久精品
|
亚洲精品天堂无码中文字幕
|
成人性生交大片免费看午夜a
|
成人午夜亚洲精品无码网站
|
精品熟女少妇aⅴ免费久久
|
亚洲精品成人无限看
|
亚洲熟妇av午夜无码不卡
|
免费观看男人免费桶女人视频
|
怡红院亚洲红怡院在线观看
|
免费在线观看黄网站
|
怡红院免费的全部视频
|
久久久久亚洲精品影视
|
A在线观看免费网站大全
|
亚洲精品久久无码
|
中文字幕亚洲图片
|
曰批全过程免费视频播放网站
|
国产精品亚洲精品青青青
|
99re免费视频
|
亚洲色大成网站www永久网站
|
国产免费av一区二区三区
|
一个人看的免费观看日本视频www
|
亚洲V无码一区二区三区四区观看
|
18级成人毛片免费观看
|
国产精品亚洲一区二区三区
|
亚洲日韩aⅴ在线视频
|
免费精品国产日韩热久久
|
黄色网址免费在线
|
67pao强力打造67194在线午夜亚洲
|
一级黄色免费网站
|
亚洲精品白色在线发布
|
四虎在线播放免费永久视频
|
亚洲第一综合天堂另类专
|
国产亚洲av片在线观看16女人
|
亚洲乱人伦中文字幕无码
|