<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: MS$B%4%7%C%/(B;color: #000000;font-size: 10pt;">$B$R$,$G$9!#(B
<div><br>
</div>
<div><span style="font-family: 'MS UI Gothic', 'MS PGothic'; ">$B%U%)!<%`$N(B/sendMessage$B$O!"(Baction.IndexAction#sendMessage or action.SendMessageAction#index$B$H(B</span></div>
<div><font face="MS UI Gothic, MS PGothic">$B2r<a$5$l$F$7$^$&$N$G!"(B</font></div>
<div><span style="font-family: 'MS UI Gothic', 'MS PGothic'; ">sendMessage$B$N$h$&$KAjBP%Q%9$K$7$F$/$@$5$$!#(B</span><font face="MS UI Gothic, MS PGothic"><br>
</font>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF824310" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>$B:9=P?M(B:</b> seasar-user-bounces@ml.seasar.org [seasar-user-bounces@ml.seasar.org] $B$,<!$N?M$NBeM}$GAw?.$7$^$7$?(B: $B66K\2BH~(B [asanohizashi@gmail.com]<br>
<b>$BAw?.F|;~(B:</b> 2012$BG/(B11$B7n(B15$BF|(B 11:10<br>
<b>$B08@h(B:</b> Seasar-user@ml.seasar.org<br>
<b>$B7oL>(B:</b> [Seasar-user:21495] $B<ALd!'(B@Execute$B$r$D$1$k$H(B404$B%(%i!<$K$J$j$^$9(B<br>
</font><br>
</div>
<div></div>
<div>$B$O$8$a$^$7$F!"(B
<div>$B$^$@%W%m%0%i%`$r;O$a$F(B4$B%v7n$N<T$G$9!#(B</div>
<div>$B<RFb;n83$G7G<(HD%7%9%F%`$r$D$/$k$3$H$K$J$j(B</div>
<div><br>
</div>
<div><a href="http://www.youtube.com/watch?v=tkk3GyTwb8w" target="_blank">http://www.youtube.com/watch?v=tkk3GyTwb8w</a></div>
<div><br>
</div>
<div>$B$NF02h$r;29M$K7G<(HD$r:n$C$F$$$?$N$G$9$,(B</div>
<div>$B:G8e$N(Bpublic String sendMessage()$B$N$H$3$m$K(B@Execute(input=&quot;index.jsp&quot;)$B$r$D$1$k$H#4#0#4%(%i!<$,I=<($5$l$F$7$^$$$^$9!#(B</div>
<div>$B$=$NItJ,$r%3%a%s%H$G$O$:$9$H2hLL$OI=<($5$l$^$9!#(B</div>
<div>$B$$$m$$$mD4$Y$F$_$?$N$G$9$,!"860x$,$o$+$i$::$$C$F$$$^$9!#(B</div>
<div><br>
</div>
<div><br>
</div>
<div>$B%U%!%$%kL>$O(Bindex.jsp$B"*(Bindex2.jsp$B!"(BIndexAction.java$B"*(BIndex2Action.java$B$H$J$C$F$*$j$^$9(B</div>
<div><br>
</div>
<div>$B:n6H4D6-$O(B</div>
<div>windows 7</div>
<div>Eclipse Java EE IDE for Web Developers</div>
<div>dolteng$B%W%m%8%'%/%H(B</div>
<div>MySQL$B$G$9(B</div>
<div><br>
</div>
<div>Index2Action.java$B"-(B</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>package net.bbs.action;</div>
<div><br>
</div>
<div>import java.util.List;</div>
<div><br>
</div>
<div>import net.bbs.entity.Message;</div>
<div>import net.bbs.service.MessageService;</div>
<div><br>
</div>
<div>import org.seasar.struts.annotation.Execute;</div>
<div><br>
</div>
<div>public class Index2Action {</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>public String userName;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>public String text;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>public List&lt;Message&gt; messages;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>@Execute(validator=false)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>public String index2(){</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>messages = MessageService.loadMessages();</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return &quot;index2.jsp&quot;;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>}</div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>@Execute(validator=true, input=&quot;index2.jsp&quot;)$B!!"+$3$3$G#4#0#4%(%i!<$,$G$^$9(B</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>public String sendMessage(){</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>MessageService.registMessage(userName, text);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return &quot;?redirect=true&quot;;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>}</div>
<div><br>
</div>
<div>}</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>index2.jsp$B"-(B</div>
<div>
<div>&lt;%@page pageEncoding=&quot;UTF-8&quot;%&gt;</div>
<div>&lt;html&gt;</div>
<div>&lt;head&gt;</div>
<div>&lt;title&gt;$B4JC1$J7G<(HD(B&lt;/title&gt;</div>
<div>&lt;/head&gt;</div>
<div>&lt;body&gt;</div>
<div>&lt;div&gt;$B4JC1$J7G<(HD(B&lt;/div&gt;</div>
<div>&lt;div&gt;</div>
<div>&lt;form action=&quot;${/sendMessage}&quot; method=&quot;POST&quot;&gt;</div>
<div>&lt;input type=&quot;text&quot; name=&quot;userName&quot; placeholder=&quot;$BL>A0(B&quot; /&gt;</div>
<div>&lt;br /&gt;</div>
<div>&lt;textarea name=&quot;userName&quot; placeholder=&quot;$BK\J8(B&quot;&gt;&lt;/textarea&gt;</div>
<div>&lt;input type=&quot;submit&quot; /&gt;</div>
<div>&lt;/form&gt;</div>
<div><br>
</div>
<div>&lt;/div&gt;</div>
<div>&lt;c:forEach var=&quot;message&quot; items=&quot;${messages }&quot;&gt;</div>
<div>&lt;div style=&quot;border:solid 1px #333&quot;&gt;</div>
<div>&lt;div style=&quot;floot:left;width:100px&quot;&gt;${f:h(message.userName) }&lt;/div&gt;</div>
<div>&lt;div style=&quot;floot:left;margin-left:10px&quot;&gt;${f:br(f:h(message.text)) }&lt;/div&gt;</div>
<div>&lt;br style=&quot;clear:both&quot;/&gt;</div>
<div>&lt;/div&gt;</div>
<div>&lt;/c:forEach&gt;</div>
<div>&lt;/body&gt;</div>
<div>&lt;/html&gt;</div>
</div>
<div><br>
</div>
<div>$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B</div>
</div>
</div>
</div>
</div>
</body>
</html>