$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">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="index.jsp")$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<Message> 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 "index2.jsp";</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="index2.jsp")$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 "?redirect=true";</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><%@page pageEncoding="UTF-8"%></div><div><html></div><div><head></div><div><title>$B4JC1$J7G<(HD(B</title></div><div></head></div><div><body></div>
<div><div>$B4JC1$J7G<(HD(B</div></div><div><div></div><div><form action="${/sendMessage}" method="POST"></div><div><input type="text" name="userName" placeholder="$BL>A0(B" /></div>
<div><br /></div><div><textarea name="userName" placeholder="$BK\J8(B"></textarea></div><div><input type="submit" /></div><div></form></div><div><br></div><div></div></div>
<div><c:forEach var="message" items="${messages }"></div><div><div style="border:solid 1px #333"></div><div><div style="floot:left;width:100px">${f:h(message.userName) }</div></div>
<div><div style="floot:left;margin-left:10px">${f:br(f:h(message.text)) }</div></div><div><br style="clear:both"/></div><div></div></div><div></c:forEach></div><div></body></div>
<div></html></div></div><div><br></div><div>$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B</div>