<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>鬼哲犯科帳</title>
<link>https://ameblo.jp/oninoheizo/</link>
<atom:link href="https://rssblog.ameba.jp/oninoheizo/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>Java</description>
<language>ja</language>
<item>
<title>AgeChecked.jsp</title>
<description>
<![CDATA[ &lt;%@ page language="java" contentType="text/html; charset=Shift_JIS"<br>    pageEncoding="Shift_JIS"%&gt;<br>&lt;%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html"%&gt;<br>&lt;%@ taglib uri="/WEB-INF/lib/struts-bean.tld" prefix="bean"%&gt;<br><br>&lt;html:html locale="true"&gt;<br>    &lt;bean:parameter id="result" name="age" /&gt;<br>    <br>    &lt;body&gt;<br>        &lt;h1&gt;正常に遷移しました&lt;/h1&gt;<br>        あなたの年齢は&lt;bean:write name="result" /&gt;です。<br>    &lt;/body&gt;<br>&lt;/html:html&gt; <br>
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852743729.html</link>
<pubDate>Tue, 05 Apr 2011 23:42:08 +0900</pubDate>
</item>
<item>
<title>input2.jsp</title>
<description>
<![CDATA[ &lt;%@ page language="java" contentType="text/html; charset=Shift_JIS"<br>    pageEncoding="Shift_JIS"%&gt;<br>&lt;%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html"%&gt;<br><br>&lt;html:html locale="true"&gt;<br>&lt;body&gt;<br>&lt;h1&gt;StrutsValidator（サーバーサイド）を使った検証&lt;/h1&gt;<br>&lt;html:errors /&gt;<br><br>年齢を入力して下さい。（0以上150以下の整数で入力）<br>&lt;html:form action="/CheckAge2"&gt;<br>    年齢&lt;html:text property="age" /&gt;<br>    &lt;html:errors property="age" /&gt;<br>    &lt;html:submit value="報告" /&gt;<br>&lt;/html:form&gt;<br>&lt;/body&gt;<br>&lt;/html:html&gt;
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852743042.html</link>
<pubDate>Tue, 05 Apr 2011 23:41:42 +0900</pubDate>
</item>
<item>
<title>input1.jsp</title>
<description>
<![CDATA[ &lt;%@ page language="java" contentType="text/html; charset=Shift_JIS"<br>    pageEncoding="Shift_JIS"%&gt;<br>&lt;%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html"%&gt;<br><br>&lt;html:html locale="true"&gt;<br>&lt;body&gt;<br>&lt;h1&gt;validate()メソッドを使った検証&lt;/h1&gt;<br><br>&lt;html:errors /&gt;<br><br>年齢を入力して下さい。（0以上150以下の整数で入力）<br>&lt;html:form action="/CheckAge"&gt;<br>    年齢&lt;html:text property="age" /&gt;<br>    &lt;html:errors property="age" /&gt;<br>    &lt;html:submit value="報告" /&gt;<br>&lt;/html:form&gt;<br>&lt;/body&gt;<br>&lt;/html:html&gt;
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852742493.html</link>
<pubDate>Tue, 05 Apr 2011 23:41:11 +0900</pubDate>
</item>
<item>
<title>struts-config.xml</title>
<description>
<![CDATA[ &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;<br>&lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"&gt;<br>&lt;struts-config&gt;<br>  &lt;form-beans&gt;<br>    &lt;form-bean name="CheckAgeForm" type="form.CheckAgeForm"/&gt;<br>    &lt;form-bean name="CheckAgeForm2" type="form.CheckAgeForm"/&gt;<br>    &lt;form-bean name="CheckAgeForm3" type="org.apache.struts.validator.DynaValidatorForm"/&gt;<br>  &lt;/form-beans&gt;<br>  &lt;action-mappings&gt;<br>    &lt;action path="/CheckAge" name="CheckAgeForm" type="action.CheckAgeAction" validate="true" input="/view/input1.jsp"&gt;<br>      &lt;forward name="checked" path="/view/AgeChecked.jsp"/&gt;<br>    &lt;/action&gt;<br>    &lt;action path="/CheckAge2" name="CheckAgeForm2" type="action.CheckAgeAction" validate="true" input="/view/input2.jsp"&gt;<br>      &lt;forward name="checked" path="/view/AgeChecked.jsp"/&gt;<br>    &lt;/action&gt;<br>    &lt;action path="/CheckAge3" name="CheckAgeForm3" type="org.apache.struts.actions.ForwardAction" validate="true" input="/view/input3.jsp" parameter="/view/AgeChecked.jsp"&gt;<br>    &lt;/action&gt;<br>  &lt;/action-mappings&gt;<br>  &lt;controller/&gt;<br>  &lt;message-resources parameter="Message_jp"/&gt;<br>  &lt;plug-in className="org.apache.struts.validator.ValidatorPlugIn"&gt;<br>    &lt;set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/&gt;<br>  &lt;/plug-in&gt;<br>&lt;/struts-config&gt;<br><br>
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852741159.html</link>
<pubDate>Tue, 05 Apr 2011 23:40:11 +0900</pubDate>
</item>
<item>
<title>Message_jp.propaties</title>
<description>
<![CDATA[ error.age.range=\u5E74\u9F62\u306E\u7BC4\u56F2\u306F0\u6B73\u4EE5\u4E0A150\u6B73\u4EE5\u4E0B\u306B\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044<br>error.age.notint=\u5E74\u9F62\u306F\u6574\u6570\u3067\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044<br>error.age.required=\u5E74\u9F62\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044\u3002<br>errors.prefix=&lt;font color\="\#ff0000"&gt;<br>errors.suffix=&lt;/font&gt;&lt;br&gt;<br><br>
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852738786.html</link>
<pubDate>Tue, 05 Apr 2011 23:38:02 +0900</pubDate>
</item>
<item>
<title>action.CheckAgeAction</title>
<description>
<![CDATA[ package action;<br><br>import javax.servlet.http.HttpServletRequest;<br>import javax.servlet.http.HttpServletResponse;<br><br>import org.apache.struts.action.Action;<br>import org.apache.struts.action.ActionForm;<br>import org.apache.struts.action.ActionForward;<br>import org.apache.struts.action.ActionMapping;<br><br>public class CheckAgeAction extends Action {<br><br>    public ActionForward execute(ActionMapping mapping, ActionForm form,<br>            HttpServletRequest request, HttpServletResponse response)<br>            throws Exception {<br><br>        return mapping.findForward("checked");<br>    }<br><br>}<br><br>
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852737291.html</link>
<pubDate>Tue, 05 Apr 2011 23:37:11 +0900</pubDate>
</item>
<item>
<title>form.CheckAgeForm</title>
<description>
<![CDATA[ package form;<br><br>import javax.servlet.http.HttpServletRequest;<br><br>import org.apache.struts.action.ActionErrors;<br>import org.apache.struts.action.ActionForm;<br>import org.apache.struts.action.ActionMapping;<br>import org.apache.struts.action.ActionMessage;<br><br>import com.sun.org.apache.bcel.internal.generic.RETURN;<br><br>public class CheckAgeForm extends ActionForm {<br><br>    private int age_;<br><br>    public void setAge_(int age_) {<br>        this.age_ = age_;<br>    }<br><br>    public int getAge_() {<br>        return age_;<br>    }<br><br>    public ActionErrors validate(ActionMapping mapping,<br>            HttpServletRequest request) {<br>        ActionErrors errors = new ActionErrors();<br><br>        try {<br>            String ageString = request.getParameter("age");<br><br>            if (ageString == null || " ".equals(ageString)) {<br>                errors.add("age", new ActionMessage("error.age.required"));<br>            } else {<br>                int age = Integer.parseInt(ageString);<br><br>                if (age &lt; 0 || 150 &lt; age) {<br>                    errors.add("age", new ActionMessage("error.age.range"));<br>                }<br><br>            }<br>        } catch (NumberFormatException ex) {<br>            errors.add("age", new ActionMessage("error.age.notint"));<br>        }<br>        return errors;<br>    }<br>}<br><br>
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10852735372.html</link>
<pubDate>Tue, 05 Apr 2011 23:34:27 +0900</pubDate>
</item>
<item>
<title>struts-config.xml</title>
<description>
<![CDATA[ &lt;?xml version="1.0" encoding="Shift_JIS"?&gt;<br>&lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"<br> "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd"&gt;<br><br>&lt;struts-config&gt;<br>    &lt;form-beans&gt;<br>        &lt;form-bean name="loginForm" type="form.LoginForm"/&gt;<br>    &lt;/form-beans&gt;<br>    <br>    &lt;action-mappings&gt;<br>        &lt;action name="loginForm" type="action.LoginAction" path="/login" scope="request"&gt;<br>            &lt;forward name="success" path="/view/success.jsp"/&gt;<br>        &lt;/action&gt;<br>    &lt;/action-mappings&gt;<br>&lt;/struts-config&gt; <br>
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10844329175.html</link>
<pubDate>Mon, 28 Mar 2011 23:10:52 +0900</pubDate>
</item>
<item>
<title>web.xml</title>
<description>
<![CDATA[ &lt;?xml version="1.0" encoding="Shift_JIS"?&gt;<br>&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;<br>    &lt;filter&gt;<br>        &lt;filter-name&gt;<br>            EncodeFilter<br>        &lt;/filter-name&gt;<br>        &lt;filter-class&gt;<br>            filters.SetCharacterEncodingFilter<br>        &lt;/filter-class&gt;<br>        &lt;init-param&gt;<br>            &lt;param-name&gt;<br>                encoding<br>            &lt;/param-name&gt;<br>            &lt;param-value&gt;<br>                Shift_JIS<br>            &lt;/param-value&gt;<br>        &lt;/init-param&gt;<br>    &lt;/filter&gt;<br>    <br>    &lt;filter-mapping&gt;<br>        &lt;filter-name&gt;<br>            EncodeFilter<br>        &lt;/filter-name&gt;<br>        &lt;url-pattern&gt;<br>            /*<br>        &lt;/url-pattern&gt;<br>    &lt;/filter-mapping&gt;<br>    <br>    &lt;servlet&gt;<br>        &lt;servlet-name&gt;<br>            action<br>        &lt;/servlet-name&gt;<br>        &lt;servlet-class&gt;<br>            org.apache.struts.action.ActionServlet<br>        &lt;/servlet-class&gt;<br>        &lt;init-param&gt;<br>            &lt;param-name&gt;<br>                config<br>            &lt;/param-name&gt;<br>            &lt;param-value&gt;<br>                /WEB-INF/struts-config.xml<br>            &lt;/param-value&gt;<br>        &lt;/init-param&gt;<br>        &lt;load-on-startup&gt;<br>            1<br>        &lt;/load-on-startup&gt;<br>    &lt;/servlet&gt;<br>    <br>    &lt;servlet-mapping&gt;<br>        &lt;servlet-name&gt;<br>            action<br>        &lt;/servlet-name&gt;<br>        &lt;url-pattern&gt;<br>            *.do<br>        &lt;/url-pattern&gt;<br>    &lt;/servlet-mapping&gt;<br>    <br>      &lt;welcome-file-list&gt;<br>    &lt;welcome-file&gt;view/loginForm.html&lt;/welcome-file&gt;<br>  &lt;/welcome-file-list&gt;<br>&lt;/web-app&gt;<br> 
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10844328393.html</link>
<pubDate>Mon, 28 Mar 2011 23:10:02 +0900</pubDate>
</item>
<item>
<title>success</title>
<description>
<![CDATA[ &lt;%@ page language="java" contentType="text/html; charset=Shift_JIS"<br>    pageEncoding="Shift_JIS"%&gt;<br>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"&gt;<br>&lt;title&gt;ログイン結果&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;%= (String)request.getAttribute("message") %&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;
]]>
</description>
<link>https://ameblo.jp/oninoheizo/entry-10844326989.html</link>
<pubDate>Mon, 28 Mar 2011 23:09:05 +0900</pubDate>
</item>
</channel>
</rss>
