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

📄 struts 2_0的action讲解 - max on java - blogjava.mht

📁 MVC结构中struts的详细介绍
💻 MHT
📖 第 1 页 / 共 5 页
字号:
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kEnd.gif"=20
align=3Dtop> &nbsp; &nbsp;}</SPAN></SPAN><SPAN style=3D"COLOR: =
#000000"><BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" =
align=3Dtop>=20
&nbsp; &nbsp;<BR><IMG id=3DCodehighlighter1_452_473_Open_Image=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_452_473_Open_Text.style.display=3D'none'; =
Codehighlighter1_452_473_Closed_Image.style.display=3D'inline'; =
Codehighlighter1_452_473_Closed_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kStart.gif"=20
align=3Dtop><IMG id=3DCodehighlighter1_452_473_Closed_Image =
style=3D"DISPLAY: none"=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_452_473_Closed_Text.style.display=3D'none'; =
Codehighlighter1_452_473_Open_Image.style.display=3D'inline'; =
Codehighlighter1_452_473_Open_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBl=
ock.gif"=20
align=3Dtop> &nbsp; &nbsp;</SPAN><SPAN style=3D"COLOR: =
#0000ff">public</SPAN><SPAN=20
style=3D"COLOR: #000000"> String getMessage() </SPAN><SPAN=20
id=3DCodehighlighter1_452_473_Closed_Text=20
style=3D"BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; =
DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 =
1px solid; BACKGROUND-COLOR: #ffffff"><IMG=20
src=3D"http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN=20
id=3DCodehighlighter1_452_473_Open_Text><SPAN style=3D"COLOR: =
#000000">{<BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" =
align=3Dtop>=20
&nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN=20
style=3D"COLOR: #0000ff">return</SPAN><SPAN style=3D"COLOR: #000000">=20
message;<BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kEnd.gif"=20
align=3Dtop> &nbsp; &nbsp;}</SPAN></SPAN><SPAN style=3D"COLOR: =
#000000"><BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif"=20
align=3Dtop><BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" =
align=3Dtop>=20
&nbsp; &nbsp;@Override<BR><IMG id=3DCodehighlighter1_512_678_Open_Image=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_512_678_Open_Text.style.display=3D'none'; =
Codehighlighter1_512_678_Closed_Image.style.display=3D'inline'; =
Codehighlighter1_512_678_Closed_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kStart.gif"=20
align=3Dtop><IMG id=3DCodehighlighter1_512_678_Closed_Image =
style=3D"DISPLAY: none"=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_512_678_Closed_Text.style.display=3D'none'; =
Codehighlighter1_512_678_Open_Image.style.display=3D'inline'; =
Codehighlighter1_512_678_Open_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBl=
ock.gif"=20
align=3Dtop> &nbsp; &nbsp;</SPAN><SPAN style=3D"COLOR: =
#0000ff">public</SPAN><SPAN=20
style=3D"COLOR: #000000"> String execute() </SPAN><SPAN=20
id=3DCodehighlighter1_512_678_Closed_Text=20
style=3D"BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; =
DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 =
1px solid; BACKGROUND-COLOR: #ffffff"><IMG=20
src=3D"http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN=20
id=3DCodehighlighter1_512_678_Open_Text><SPAN style=3D"COLOR: =
#000000">{<BR><IMG=20
id=3DCodehighlighter1_568_605_Open_Image=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_568_605_Open_Text.style.display=3D'none'; =
Codehighlighter1_568_605_Closed_Image.style.display=3D'inline'; =
Codehighlighter1_568_605_Closed_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kStart.gif"=20
align=3Dtop><IMG id=3DCodehighlighter1_568_605_Closed_Image =
style=3D"DISPLAY: none"=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_568_605_Closed_Text.style.display=3D'none'; =
Codehighlighter1_568_605_Open_Image.style.display=3D'inline'; =
Codehighlighter1_568_605_Open_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBl=
ock.gif"=20
align=3Dtop> &nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN=20
style=3D"COLOR: #0000ff">if</SPAN><SPAN style=3D"COLOR: =
#000000">(</SPAN><SPAN=20
style=3D"COLOR: #000000">"</SPAN><SPAN style=3D"COLOR: =
#000000">max</SPAN><SPAN=20
style=3D"COLOR: #000000">"</SPAN><SPAN style=3D"COLOR: =
#000000">.equals(name)=20
&amp;&amp;</SPAN><SPAN style=3D"COLOR: #000000"></SPAN><SPAN=20
style=3D"COLOR: #000000">"</SPAN><SPAN style=3D"COLOR: =
#000000">Secret</SPAN><SPAN=20
style=3D"COLOR: #000000">"</SPAN><SPAN style=3D"COLOR: =
#000000">.equals(password))=20
</SPAN><SPAN id=3DCodehighlighter1_568_605_Closed_Text=20
style=3D"BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; =
DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 =
1px solid; BACKGROUND-COLOR: #ffffff"><IMG=20
src=3D"http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN=20
id=3DCodehighlighter1_568_605_Open_Text><SPAN style=3D"COLOR: =
#000000">{<BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" =
align=3Dtop>=20
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message </SPAN><SPAN=20
style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: =
#000000"></SPAN><SPAN=20
style=3D"COLOR: #000000">"</SPAN><SPAN style=3D"COLOR: #000000">Welcome, =

</SPAN><SPAN style=3D"COLOR: #000000">"</SPAN><SPAN=20
style=3D"COLOR: #000000"></SPAN><SPAN style=3D"COLOR: =
#000000">+</SPAN><SPAN=20
style=3D"COLOR: #000000"> name;<BR><IMG =
id=3DCodehighlighter1_612_657_Open_Image=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_612_657_Open_Text.style.display=3D'none'; =
Codehighlighter1_612_657_Closed_Image.style.display=3D'inline'; =
Codehighlighter1_612_657_Closed_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kStart.gif"=20
align=3Dtop><IMG id=3DCodehighlighter1_612_657_Closed_Image =
style=3D"DISPLAY: none"=20
onclick=3D"this.style.display=3D'none'; =
Codehighlighter1_612_657_Closed_Text.style.display=3D'none'; =
Codehighlighter1_612_657_Open_Image.style.display=3D'inline'; =
Codehighlighter1_612_657_Open_Text.style.display=3D'inline';"=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBl=
ock.gif"=20
align=3Dtop> &nbsp; &nbsp; &nbsp; &nbsp;}</SPAN></SPAN><SPAN=20
style=3D"COLOR: #000000"></SPAN><SPAN style=3D"COLOR: =
#0000ff">else</SPAN><SPAN=20
style=3D"COLOR: #000000"></SPAN><SPAN =
id=3DCodehighlighter1_612_657_Closed_Text=20
style=3D"BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; =
DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 =
1px solid; BACKGROUND-COLOR: #ffffff"><IMG=20
src=3D"http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN=20
id=3DCodehighlighter1_612_657_Open_Text><SPAN style=3D"COLOR: =
#000000">{<BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" =
align=3Dtop>=20
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message </SPAN><SPAN=20
style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: =
#000000"></SPAN><SPAN=20
style=3D"COLOR: #000000">"</SPAN><SPAN style=3D"COLOR: #000000">Invalid =
user or=20
password</SPAN><SPAN style=3D"COLOR: #000000">"</SPAN><SPAN=20
style=3D"COLOR: #000000">;<BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kEnd.gif"=20
align=3Dtop> &nbsp; &nbsp; &nbsp; &nbsp;}</SPAN></SPAN><SPAN=20
style=3D"COLOR: #000000"><BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" =
align=3Dtop>=20
&nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN=20
style=3D"COLOR: #0000ff">return</SPAN><SPAN style=3D"COLOR: #000000">=20
SUCCESS;<BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBloc=
kEnd.gif"=20
align=3Dtop> &nbsp; &nbsp;}</SPAN></SPAN><SPAN style=3D"COLOR: =
#000000"><BR><IMG=20
src=3D"http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockEn=
d.gif"=20
align=3Dtop>}</SPAN></SPAN></DIV><SPAN=20
style=3D"FONT-SIZE: smaller; FONT-STYLE: italic">=E4=BE=8B4=20
classes/tutorial/Login.java</SPAN><BR><BR>
<DIV=20
style=3D"BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; =
BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; =
PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; =
WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px =
solid; BACKGROUND-COLOR: #eeeeee"><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ page =
contentType</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=3D</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">text/html;=20
charset=3DUTF-8</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"></SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #ffff00"> %&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR></SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ taglib =
prefix</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=3D</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">s</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> uri</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=3D</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: =
#f5f5f5">/struts-tags</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"></SPAN><SPAN=20
style=3D"COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR></SPAN><SPAN style=3D"COLOR: =
#0000ff">&lt;</SPAN><SPAN=20
style=3D"COLOR: #800000">html</SPAN><SPAN style=3D"COLOR: =
#0000ff">&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR></SPAN><SPAN style=3D"COLOR: =
#0000ff">&lt;</SPAN><SPAN=20
style=3D"COLOR: #800000">head</SPAN><SPAN style=3D"COLOR: =
#0000ff">&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR>&nbsp; &nbsp; </SPAN><SPAN=20
style=3D"COLOR: #0000ff">&lt;</SPAN><SPAN style=3D"COLOR: =
#800000">title</SPAN><SPAN=20
style=3D"COLOR: #0000ff">&gt;</SPAN><SPAN style=3D"COLOR: =
#000000">Login</SPAN><SPAN=20
style=3D"COLOR: #0000ff">&lt;/</SPAN><SPAN=20
style=3D"COLOR: #800000">title</SPAN><SPAN style=3D"COLOR: =
#0000ff">&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR></SPAN><SPAN style=3D"COLOR: =
#0000ff">&lt;/</SPAN><SPAN=20
style=3D"COLOR: #800000">head</SPAN><SPAN style=3D"COLOR: =
#0000ff">&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR></SPAN><SPAN style=3D"COLOR: =
#0000ff">&lt;</SPAN><SPAN=20
style=3D"COLOR: #800000">body</SPAN><SPAN style=3D"COLOR: =
#0000ff">&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR></SPAN><SPAN style=3D"COLOR: =
#0000ff">&lt;</SPAN><SPAN=20
style=3D"COLOR: #800000">s:form </SPAN><SPAN=20
style=3D"COLOR: #ff0000">action</SPAN><SPAN=20
style=3D"COLOR: #0000ff">=3D"Login"</SPAN><SPAN style=3D"COLOR: =
#ff0000">=20
method</SPAN><SPAN style=3D"COLOR: #0000ff">=3D"POST"</SPAN><SPAN=20
style=3D"COLOR: #0000ff">&gt;</SPAN><SPAN style=3D"COLOR: =
#000000"><BR>&nbsp; &nbsp;=20
</SPAN><SPAN style=3D"COLOR: #0000ff">&lt;</SPAN><SPAN=20
style=3D"COLOR: #800000">s:textfield </SPAN><SPAN=20
style=3D"COLOR: #ff0000">name</SPAN><SPAN=20
style=3D"COLOR: #0000ff">=3D"name"</SPAN><SPAN style=3D"COLOR: #ff0000"> =

label</SPAN><SPAN style=3D"COLOR: #0000ff">=3D"User name"</SPAN><SPAN=20
style=3D"COLOR: #ff0000"></SPAN><SPAN style=3D"COLOR: =
#0000ff">/&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR>&nbsp; &nbsp; </SPAN><SPAN=20
style=3D"COLOR: #0000ff">&lt;</SPAN><SPAN style=3D"COLOR: =
#800000">s:password=20
</SPAN><SPAN style=3D"COLOR: #ff0000">name</SPAN><SPAN=20
style=3D"COLOR: #0000ff">=3D"password"</SPAN><SPAN style=3D"COLOR: =
#ff0000">=20
label</SPAN><SPAN style=3D"COLOR: #0000ff">=3D"Password"</SPAN><SPAN=20
style=3D"COLOR: #ff0000"></SPAN><SPAN style=3D"COLOR: =
#0000ff">/&gt;</SPAN><SPAN=20
style=3D"COLOR: #000000"><BR>&nbsp; &nbsp; </SPAN><SPAN=20
style=3D"COLOR: #0000ff">&lt;</SPAN><SPAN style=3D"COLOR: =
#800000">s:submit=20
</SPAN><SPAN style=3D"COLOR: #ff0000">value</SPAN><SPAN=20
style=3D"COLOR: #0000ff">=3D"Submit"</SPAN><SPAN=20
style=3D"COLOR: #0000ff">/&gt;</SPAN><SPAN style=3D"COLOR: =
#000000"><BR></SPAN><SPAN=20
style=3D"COLOR: #0000ff">&lt;/</SPAN><SPAN=20
style=3D"COLOR: #800000">s:form</SPAN><SPAN=20
style=3D"COLOR: #0000ff">&gt;</SPAN><SPAN style=3D"COLOR: =
#000000"><BR></SPAN><SPAN=20
style=3D

⌨️ 快捷键说明

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