{"id":3844,"date":"2017-12-13T10:19:02","date_gmt":"2017-12-13T09:19:02","guid":{"rendered":"http:\/\/liceocuneo.it\/oddenino\/?p=3844"},"modified":"2017-12-13T10:19:02","modified_gmt":"2017-12-13T09:19:02","slug":"es-18-su-jsp","status":"publish","type":"post","link":"https:\/\/liceocuneo.it\/oddenino\/es-18-su-jsp\/","title":{"rendered":"Es 18 su JSP"},"content":{"rendered":"<pre>&lt;%-- \r\n    Document   : index\r\n    Created on : 12-dic-2017, 21.55.42\r\n    Author     : GfO\r\n--%&gt;\r\n\r\n&lt;%@page contentType=\"text\/html\" pageEncoding=\"UTF-8\"%&gt;\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\"&gt;\r\n        &lt;title&gt;Quadrati da n1 a n2&lt;\/title&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n        &lt;h1&gt;Quadrati da n1 a n2&lt;\/h1&gt;\r\n        &lt;form action=\"index.jsp\" method=\"get\"&gt;\r\n            n1: &lt;input name=\"n1\" type=\"text\"&gt;\r\n            n2: &lt;input name=\"n2\" type=\"text\"&gt;\r\n            &lt;input type=\"submit\" value=\"Invia\"&gt;\r\n        &lt;\/form&gt;\r\n        &lt;%\r\n            String n1str = request.getParameter(\"n1\");\r\n            String n2str = request.getParameter(\"n2\");\r\n\r\n            if (n1str != null &amp;&amp; n2str != null)\r\n                try {\r\n                    int n1 = Integer.parseInt(n1str);\r\n                    int n2 = Integer.parseInt(n2str);\r\n        %&gt;\r\n        &lt;table&gt;\r\n            &lt;% for (int i = n1; i &lt;= n2; i++) { %&gt;\r\n            &lt;tr&gt;&lt;td&gt; &lt;%=i%&gt; &lt;\/td&gt;&lt;td&gt; &lt;%=i * i%&gt; &lt;\/td&gt;&lt;\/tr&gt;\r\n            &lt;% } \/\/ end for %&gt;\r\n        &lt;\/table&gt;\r\n        &lt;% } catch (Exception e) { %&gt;\r\n        &lt;p&gt;Devi inserire due numeri validi&lt;\/p&gt;\r\n        &lt;% } \/\/ end try-catch %&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;%&#8211; Document : index Created on : 12-dic-2017, 21.55.42 Author : GfO &#8211;%&gt; &lt;%@page contentType=&#8221;text\/html&#8221; pageEncoding=&#8221;UTF-8&#8243;%&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=UTF-8&#8243;&gt; &lt;title&gt;Quadrati da n1 a n2&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;h1&gt;Quadrati da n1 a n2&lt;\/h1&gt; &lt;form action=&#8221;index.jsp&#8221; method=&#8221;get&#8221;&gt; n1: &lt;input name=&#8221;n1&#8243; type=&#8221;text&#8221;&gt; n2: &lt;input name=&#8221;n2&#8243; type=&#8221;text&#8221;&gt; &lt;input type=&#8221;submit&#8221; value=&#8221;Invia&#8221;&gt; &lt;\/form&gt; &lt;% String n1str = &hellip; <a href=\"https:\/\/liceocuneo.it\/oddenino\/es-18-su-jsp\/\" class=\"more-link\">Continua a leggere <span class=\"screen-reader-text\">Es 18 su JSP<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-3844","post","type-post","status-publish","format-standard","hentry","category-informatica"],"_links":{"self":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts\/3844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/comments?post=3844"}],"version-history":[{"count":0,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts\/3844\/revisions"}],"wp:attachment":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/media?parent=3844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/categories?post=3844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/tags?post=3844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}