{"id":192434,"date":"2013-09-03T21:54:02","date_gmt":"2013-09-03T17:54:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=192434"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=192434","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 JSF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 IntelliJ Idea. \u0427\u0430\u0441\u0442\u044c 2: \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <a href=\"http:\/\/habrahabr.ru\/post\/190006\/\">\u0427\u0430\u0441\u0442\u044c 1.<\/a><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0438\u0437 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0434\u044e\u0439\u043c\u044b.<br \/>  \u0415\u0441\u043b\u0438 \u0442\u0435\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430, \u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<h4> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/h4>\n<p>  \u041b\u044e\u0431\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432 IntelliJ Idea \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 Java-\u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 GlassFish. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<br \/>   <b>1.<\/b> \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0432 IntelliJ IDEA \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <b>Create New Project<\/b> \u0432 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435. \u0412 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <b> New Project <\/b> \u0432 \u043c\u0435\u043d\u044e File.<br \/>   \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. <br \/>  <b>2.<\/b> \u0412 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <b>Java Module<\/b>. <br \/>  <b>3.<\/b> \u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430, \u0432 \u043f\u043e\u043b\u0435 <b>Project name<\/b>, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>   <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/34d\/99e\/638\/34d99e6384b2797b68c877172d628361.png\" alt=\"image\"\/><br \/>  <strong>4. <\/strong>\u0415\u0441\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 JDK, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a IntelliJ IDEA \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0435\u0433\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <strong>Project SDK, <\/strong>\u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u0434\u0430\u043b\u0435\u0435 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443.<br \/>  \u0412 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 JDK \u043a \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<br \/>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 <strong>New<\/strong> \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043f\u043e\u043b\u044f <strong>Project SDK<\/strong> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <strong>JDK<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/27d\/976\/05c\/27d97605cf4331890acadb925a9a60c6.png\"\/><br \/>  \u0412 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 <strong>Select Home Directory for JDK<\/strong> \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <strong>JDK<\/strong> \u0438 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <strong>\u041e\u041a.<\/strong><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/1bf\/58b\/837\/1bf58b8372b648b831278d525d53b4ce.png\"\/><br \/>  \u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 JDK \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <strong>Project SDK<\/strong><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b7b\/338\/e4d\/b7b338e4d0a04993878a87f96b187647.png\"\/><br \/>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <strong>Next<\/strong>.<br \/>  <strong>5. <\/strong>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<br \/>  \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Web \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 <strong>Web Application<\/strong>.<br \/>  \u041a\u043e\u0433\u0434\u0430 \u0412\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u044d\u0442\u043e, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0421\u0435\u0440\u0432\u043b\u0435\u0442\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e9a\/2e5\/659\/e9a2e5659d4816787ff123fd399b2978.png\"\/><br \/>  \u0412\u0435\u0440\u0441\u0438\u044e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (2.5) \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0439.<br \/>  \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 JSF, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043e\u043f\u0446\u0438\u044e. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 2.0 \u0438 \u043e\u043f\u0446\u0438\u044f <strong>Download<\/strong>. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0441 \u0412\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ce6\/f01\/244\/ce6f012445f6405bbc1aabc551e8b42d.png\"\/><br \/>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 GlassFish.<br \/>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <strong>Finish<\/strong> \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0430\u0441\u0442\u0435\u0440\u0430.<br \/>  \u041f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435 \u043f\u043e\u043a\u0430 IntelliJ IDEA \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0435\u043a\u0442. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0412\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u043a\u043d\u0435 <strong>Project<\/strong>.<\/p>\n<h4> \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e IntelliJ IDEA.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ffa\/592\/e43\/ffa592e437f9dde71f44bf952f255a36.png\"\/><br \/>  \u0412 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u0443\u0437\u043b\u0430:  <\/p>\n<ul>\n<li><strong>JSFDemo<\/strong>. \u042d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0412\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c. \u0412 \u044d\u0442\u043e\u043c \u0443\u0437\u043b\u0435<\/li>\n<\/ul>\n<p>  \u041f\u0430\u043f\u043a\u0430<em> .idea<\/em> \u0438 \u0444\u0430\u0439\u043b <em>JSFDemo.iml<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  \u041f\u0430\u043f\u043a\u0430<em> lib <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 .jar \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 JSF.<br \/>  \u041f\u0430\u043f\u043a\u0430<em> src <\/em>\u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 Java. <br \/>  \u041f\u0430\u043f\u043a\u0430 <em>web <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b Web \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Web-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0442\u0438\u043b\u0435\u0439, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0442.\u0434. \u042d\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>WEB-INF <\/em>\u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c <em>faces-config.xml<\/em> \u0438 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f Web \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 <em>web.xml<\/em>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 <em>web <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b <em>index.jsp<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044f\u043b\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Hello, World.  <\/p>\n<ul>\n<li><strong>External Libraries.<\/strong> \u042d\u0442\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0432\u0441\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u044d\u0442\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f .jar \u0444\u0430\u0439\u043b\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a JDK \u0438 GlassFish.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4> \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>Run <\/strong>\u0438\u0437 \u043c\u0435\u043d\u044e <strong>Run<\/strong> \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448 <strong>Shift+F10.<\/strong><br \/>  \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, IntelliJ IDEA \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 GlassFish \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d2a\/dbb\/4d2\/d2adbb4d26b21f05bbe4840560908ea6.png\"\/><br \/>  \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e JSF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 &nbsp;\u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  <em>\u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b <\/em>\u0432 IntelliJ IDEA \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0434\u0432\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435, \u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0449\u0430\u043d\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b (\u0430, \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u043c, \u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0415\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>Artifacts<\/strong> \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430 <strong>Project Structure<\/strong>.<br \/>  \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0430\u0440\u0442\u0438\u0444\u0430\u043a\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043e\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0435 \u0438\u0437\u0443\u0447\u0438\u043c.<br \/>  <strong>1. <\/strong>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e <strong>Project Structure<\/strong> (<strong>File | Project Structure<\/strong>, \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0432\u0438\u0448 CTRL+ALT+SHIFT+S \u0438\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432).<br \/>  <strong>2. <\/strong>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 <strong>Artifacts<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b0a\/0fc\/19d\/b0a0fc19de8051b9232adca8055cfacf.png\"\/><br \/>  \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043e\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0442\u0438\u0444\u0430\u043a\u0442\u0430 (<strong>JSFDemo:war exploded<\/strong>). \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/74f\/002\/fc9\/74f002fc95691d088e7ce9bfc8ca0cbf.png\"\/><br \/>  \u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <strong>Web Application: Exploded. <\/strong>\u042d\u0442\u043e\u0442 \u0442\u0438\u043f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u0436\u0430\u0442\u043e\u043c\u0443 \u0430\u0440\u0445\u0438\u0432\u0443 Web \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (WAR), \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u043e\u0442\u043e\u0432\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Web \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<br \/>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c.<br \/>  \u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>&lt;project_folder&gt;\\out\\artifacts\\JSFDemo_war_exploded<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u043c <strong>Output directory<\/strong>.<br \/>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 <strong>Output Layout<\/strong>.<br \/>  \u041f\u0443\u043d\u043a\u0442<strong> &lt;output root&gt;<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e (<em>&lt;project_folder&gt;\\out\\artifacts\\JSFDemo_war_exploded<\/em>). \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043e\u043a\u043d\u0435 <strong>Project<\/strong>):<\/p>\n<ul>\n<li>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 WEB-INF \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 WEB-INF \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 WEB-INF \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e \u0432\u0441\u0435\u043c \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433).<\/li>\n<li>&#8216;<strong>JSFDemo&#8217; compile output<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b Java, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>src <\/em>\u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>WEB-INF\\classes<\/em>.<\/li>\n<li><strong>lib<\/strong> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 <strong>lib <\/strong>\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 JSF 2.0. \u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <em>WEB-INF\\lib.<\/em><\/li>\n<li>&#8216;<strong>Web&#8217; facet resources<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0432\u0430\u0448\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0442\u0438\u043b\u0435\u0439, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>web<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 \u043f\u0443\u043d\u043a\u0442\u0430 <strong>Show content of elements<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/565\/db9\/dc5\/565db9dc5500a1aaadec8939838fe817.png\"\/><br \/>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 <em>&lt;project_folder&gt;\\out\\artifacts\\JSFDemo_war_exploded.<\/em><br \/>  <strong>3. <\/strong>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u041e\u041a \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 <strong>Project Structure<\/strong>.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434.<\/p>\n<h5>\u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a<\/h5>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 IntelliJ IDEA \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\/\u043e\u0442\u043b\u0430\u0434\u043a\u0438.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430. IntelliJ IDEA \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u0440\u0435\u0434\u0435 GlassFish. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0432\u043d\u0435\u0441\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<br \/>  <strong>1.<\/strong> \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e <strong>Run\/Debug Configurations<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <strong>Edit Configurations<\/strong> \u0438\u0437 \u043c\u0435\u043d\u044e <strong>Run<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a6b\/ee8\/5fb\/a6bee85fbd99202f88c91b98b393abf5.png\"\/><br \/>  \u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<br \/>  \u041f\u043e\u043b\u0435 <strong>Startup page<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0430\u0434\u0440\u0435\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <em>index.jsp<\/em>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  <strong>2. <\/strong>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 <em><a href=\"http:\/\/localhost\">localhost<\/a>:8080\/JSFTutorial_war_exploded\/. <\/em>\u042d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  <strong>3. <\/strong>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u041e\u041a \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 <strong>Run\/Debug Configurations<\/strong>.<\/p>\n<h4>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e JSF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f <\/h4>\n<p>  \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a IntelliJ IDEA \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 JSF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 JSF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h5>\u041b\u043e\u0433\u0438\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u041d\u0430\u0448\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c. \u041e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u044b \u0432 \u0434\u044e\u0439\u043c\u044b.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c98\/b2a\/18f\/c98b2a18fd6faef4ca8f43c256e1d6f6.png\"\/><br \/>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0432 \u0434\u044e\u0439\u043c\u044b (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 1). \u0415\u0441\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 2\u0430). \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u043b \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435 \u0432\u0432\u0435\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 2\u0431, 2\u0432).<\/p>\n<h5>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0435 JSF \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438:<br \/>  <em>input_number.xhtml, <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0440\u0438\u0441\u0443\u043d\u043a\u0430 1. \u042d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0432\u0432\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<br \/>  <em>result.xhtml <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0440\u0438\u0441\u0443\u043d\u043a\u043e\u0432 2\u0430, 2\u0431, 2\u0432. \u042d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<br \/>  \u0411\u0438\u043d <em>converterBean <\/em>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0434\u044e\u0439\u043c\u044b. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 (<em>CONVERSION RESULT<\/em> \u0438\u043b\u0438 <em>CONVERSION FAILED<\/em>) \u0438 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 (<em>Convert another number<\/em> \u0438\u043b\u0438 <em>Try once more<\/em>) \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <em>result. <\/em>\u042d\u0442\u043e\u0442 \u0431\u0438\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 <em>ConverterBean.<\/em><br \/>  \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <em>faces-config.xml<\/em> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<em> converterBean <\/em>\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438.<br \/>  \u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f <em>web.xml, <\/em>\u043a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0442\u0438 \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u0430 \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0444\u044d\u0439\u0441\u043b\u0435\u0442\u0430\u043c\u0438 (\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 <em>xhtml<\/em>). \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <em>input_number.xhtml, <\/em>\u043a\u0430\u043a \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 (<em>input_number.xhtml<\/em>).<\/p>\n<h5>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 input_number.xhtml<\/h5>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<br \/>  <strong>1. <\/strong>\u0412 \u043e\u043a\u043d\u0435 <strong>Project<\/strong> \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>web<\/em> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Alt+Insert \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043c\u0435\u043d\u044e<em> New<\/em>. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e <em>JavaEE Web Page<\/em>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a69\/d5c\/b16\/a69d5cb1637b9358cc01af6f777de932.png\"\/><br \/>  <strong>2. <\/strong>\u0412 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 <em>Create JavaEE Web Page<\/em> \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <em>(input_number)<\/em> \u0432 \u043f\u043e\u043b\u0435<em> Name. <\/em>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <em>Facelets page<\/em> \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 <em>Kind<\/em> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u041e\u041a.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b22\/c00\/b4a\/b22c00b4a03f5fee00b3ce6032684080.png\"\/><br \/>  \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0444\u0430\u0439\u043b <em>input_number.xhtml<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u043e\u0442\u043a\u0440\u044b\u0442 \u0432 \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/81a\/a47\/bfc\/81aa47bfc8f71e5ba20ecf582f01085d.png\"\/><\/p>\n<h5>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 input_number.xhtml <\/h5>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0435\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c. \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0443\u0434\u0435\u0442 &quot;\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439&quot; \u0438 \u0435\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  &nbsp;  <\/p>\n<pre><code class=\"xml\">  &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;      &lt;!DOCTYPE html         PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot;         &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;      &lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:h=&quot;http:\/\/java.sun.com\/jsf\/html&quot;&gt;      &lt;h:head&gt;   &lt;\/h:head&gt;  &lt;h:head&gt;   &lt;title&gt;JSF Demo&lt;\/title&gt; &lt;\/h:head&gt;     &lt;h:body&gt;     &lt;h:outputText value=&quot;METERS TO INCHES CONVERSION&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:outputText value=&quot;Enter amount in meters (m):&quot;\/&gt;&nbsp;     &lt;h:inputText size=&quot;16&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:commandButton value=&quot;Convert into inches&quot;\/&gt;   &lt;\/h:body&gt;    &lt;\/html&gt;   <\/code><\/pre>\n<p>   <b>1. <\/b>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<strong><em> &lt;title&gt;<\/em><\/strong> \u043d\u0430<em> JSF<\/em> Demo<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/07b\/ea2\/3cf\/07bea23cf8b25c7c94dbe1ecf6d03d23.png\"\/><br \/>  <strong>2. <\/strong>\u0412 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435<em><strong> &lt;h:body&gt;<\/strong><\/em> \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 <em>Place your content here<\/em>.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443:<br \/>  &nbsp;<br \/>  &nbsp;  <\/p>\n<pre><code class=\"xml\">&lt;h:outputText value=&quot;METERS TO INCHES CONVERSION&quot;\/&gt; &lt;p&gt;&lt;br\/&gt;   &lt;br\/&gt;   <\/code><\/pre>\n<p>   \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<br \/>  <strong>3. <\/strong>\u0412\u0432\u0435\u0434\u0438\u0442\u0435<em> &lt;h:o<\/em> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 <em>h:outputText<\/em> \u0438\u0437 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u0435\u043d\u044e \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6a8\/222\/290\/6a82222903b5dab31e43f682c3c7a0e8.png\"\/><br \/>  <strong>4. <\/strong>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043f\u0440\u043e\u0431\u0435\u043b, \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 <em>v<\/em> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <em>value <\/em>(\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0443 TAB \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u0438\u0437 \u043c\u0435\u043d\u044e \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e16\/3ae\/608\/e163ae608769649e417a8b1127a3f379.png\"\/><br \/>  <strong>5. <\/strong>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 <em>METERS TO INCHES CONVERSION<\/em> \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0433\u043b\u043e\u0432\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u043a\u043e\u043d\u0446\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 (\u043d\u0430\u0436\u043c\u0438\u0442\u0435 END) \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 <em>\/<\/em> \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0442\u0435\u0433\u0430. \u0417\u0430\u0442\u0435\u043c \u0432\u0432\u0435\u0434\u0438\u0442\u0435 <em>&lt;br\/&gt;&lt;br\/&gt;<\/em> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <em>Enter<\/em> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443.<br \/>  <strong>6. <\/strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code class=\"xml\">&lt;h:outputText value=&quot;Enter amount in meters (m):&quot;\/&gt;&nbsp; &lt;h:inputText size=&quot;16&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt; &lt;h:commandButton value=&quot;Convert into inches&quot;\/&gt; <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0432 \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/bac\/ab6\/9c6\/bacab69c6288b93e1aff8cac3bf8edbd.png\"\/><\/p>\n<h5>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 web.xml<\/h5>\n<p>  \u0414\u043b\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 <em>input_number.xhtml<\/em> \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b web.xml \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code class=\"xml\">  &lt;servlet-mapping&gt;     &lt;servlet-name&gt;Faces Servlet&lt;\/servlet-name&gt;     &lt;url-pattern&gt;*.xhtml&lt;\/url-pattern&gt;   &lt;\/servlet-mapping&gt;   &lt;welcome-file-list&gt;     &lt;welcome-file&gt;input_number.xhtml&lt;\/welcome-file&gt;   &lt;\/welcome-file-list&gt;   <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0444\u0430\u0439\u043b <em>web.xml<\/em> \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"xml\">  &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;   &lt;web-app xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot;            xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;            xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee \t\t  http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&quot;            version=&quot;2.5&quot;&gt;          &lt;servlet&gt;       &lt;servlet-name&gt;Faces Servlet&lt;\/servlet-name&gt;       &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;\/servlet-class&gt;       &lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;     &lt;\/servlet&gt;     &lt;servlet-mapping&gt;       &lt;servlet-name&gt;Faces Servlet&lt;\/servlet-name&gt;       &lt;url-pattern&gt;\/faces\/*&lt;\/url-pattern&gt;     &lt;\/servlet-mapping&gt;     &lt;servlet-mapping&gt;       &lt;servlet-name&gt;Faces Servlet&lt;\/servlet-name&gt;       &lt;url-pattern&gt;*.faces&lt;\/url-pattern&gt;     &lt;\/servlet-mapping&gt;     &lt;servlet-mapping&gt;       &lt;servlet-name&gt;Faces Servlet&lt;\/servlet-name&gt;       &lt;url-pattern&gt;*.xhtml&lt;\/url-pattern&gt;     &lt;\/servlet-mapping&gt;     &lt;welcome-file-list&gt;       &lt;welcome-file&gt;input_number.xhtml&lt;\/welcome-file&gt;     &lt;\/welcome-file-list&gt;   &lt;\/web-app&gt; <\/code><\/pre>\n<p>  <strong>1. <\/strong>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <em>web.xml<\/em> \u0432 \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/>  <strong>2.<\/strong> \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u043a\u0443\u0440\u0441\u043e\u0440 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0442\u0435\u0433\u0430 <em>\/servlet-mapping&gt;<\/em> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter.<br \/>  <strong>3. <\/strong>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u0442\u0435\u0439:<br \/>   \u2014 \u041c\u0435\u043d\u044e <em>Code | Generate.<\/em><br \/>  <em> \u2014 <\/em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043c\u044b\u0448\u0438 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <em>Generate.<\/em><br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448 <em>ALT+INSERT. <\/em><br \/>  <strong>4. <\/strong>\u0412 \u043c\u0435\u043d\u044e <em>Generate<\/em> \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 <em>XML Tag.<\/em><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/db2\/ae2\/fe4\/db2ae2fe491a7d9f41ba7279f29c65d0.png\"\/><br \/>  <strong>5. <\/strong>\u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u043d\u044e <em>Choose Tag Name<\/em>, \u043d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 <em>se <\/em>\u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0435\u0433\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 <em>se<\/em>. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <em>servlet-mapping.<\/em><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/772\/a72\/f8f\/772a72f8f2d0bad30fc0047e324b3c34.png\"\/><br \/>  \u0411\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;servlet-mapping&gt; \u0438 \u043a\u0443\u0440\u0441\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u0435\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<br \/>  <strong>6. <\/strong>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0443\u043d\u043a\u0442 <strong>Faces Servlet<\/strong>.<br \/>  \u0411\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 &lt;servlet-mapping&gt; \u0438 \u043a\u0443\u0440\u0441\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u043e\u043c<em> &lt;url-pattern&gt;<\/em>.<br \/>  <strong>7. <\/strong>\u0412\u0432\u0435\u0434\u0438\u0442\u0435<em>*.xthml <\/em>\u0438 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435 ESCAPE. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ENTER \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ebc\/8f0\/252\/ebc8f025244be58ffb15d41c2ff067fd.png\"\/><br \/>  <strong>8. <\/strong>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435:<br \/>  &nbsp;  <\/p>\n<pre><code class=\"xml\">  &lt;welcome-file-list&gt;     &lt;welcome-file&gt;input_number.xhtml&lt;\/welcome-file&gt;   &lt;\/welcome-file-list&gt;   <\/code><\/pre>\n<h5>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&nbsp; <\/h5>\n<p>  <strong>1. <\/strong>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448 SHIFT+F10 \u0438\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  IntelliJ IDEA \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430:<br \/>  &nbsp;<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/59f\/14f\/782\/59f14f78279ed2b38a66efe8549b6047.png\"\/><br \/>  \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435.<br \/>  <strong>2. <\/strong>\u0417\u0430\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043a\u043d\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0432 \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438<\/h4>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0434\u0432\u0443\u0445\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0432\u043d\u0435\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u044f \u0432 <em>input_number.xml<\/em>, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 (<em>result.xhtml<\/em>) \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432 \u0444\u0430\u0439\u043b <em>faces-config.xml.<\/em><\/p>\n<h5>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 input_number.xhtml <\/h5>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  &nbsp;  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;  &lt;!DOCTYPE html         PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot;         &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;  &lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:h=&quot;http:\/\/java.sun.com\/jsf\/html&quot;&gt;  &lt;h:head&gt;     &lt;title&gt;JSF Demo&lt;\/title&gt; &lt;\/h:head&gt;  &lt;h:body&gt;     &lt;h:outputText value=&quot;METERS TO INCHES CONVERSION&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:form&gt;         &lt;h:outputText value=&quot;Enter amount in meters (m):&quot;\/&gt;&nbsp;         &lt;h:inputText size=&quot;16&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;         &lt;h:commandButton action=&quot;result&quot; value=&quot;Convert into inches&quot;\/&gt;     &lt;\/h:form&gt; &lt;\/h:body&gt;  &lt;\/html&gt;   <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>Surround With<\/em> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 \u0442\u0435\u0433\u0438<em> &lt;h:form&gt;&#8230;&lt;\/h:form&gt;<\/em>. <br \/>  <strong>1. <\/strong>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/995\/51c\/56f\/99551c56fa3b63069824b5c9c9eec7dd.png\"\/><br \/>  <strong>2. <\/strong>\u0412\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>Surround With<\/em> (\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0432\u0438\u0448 \u0421TRL+ALT+T \u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0432 \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e <strong>Code | Surround With<\/strong>).<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/722\/42b\/0ac\/72242b0ac322c10ebda459a7edc7709f.png\"\/><br \/>  <strong>3. <\/strong>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 <strong>T2. Surround with &lt;tag&gt;&lt;\/tag&gt; in HTML\/JSP<\/strong>.<br \/>  <strong>4. <\/strong>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 <em>h, <\/em>\u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <strong>h:form<\/strong> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 ESCAPE. <br \/>  <strong>5. <\/strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 <em>action=&quot;result&quot; <\/em>\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442<em> &lt;h:commandButton&gt;<\/em>.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d02\/a38\/503\/d02a38503e2206a6ec091a1f42b6324f.png\"\/><\/p>\n<h5>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 result.xhtml <\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <em>result.xhtml<\/em> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0444\u0430\u0439\u043b\u0443 <em>input_number.xhtml.<\/em><br \/>  <em><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f33\/47c\/87f\/f3347c87fa2cb1a943af0e9522a67ee9.png\"\/><\/em><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/577\/b13\/6f1\/577b136f1157efd860f9737c4754af85.png\"\/><\/p>\n<h5>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 result.xhtml <\/h5>\n<p>  \u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b result.xhtml \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  &nbsp;  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;  &lt;!DOCTYPE html         PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot;         &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;  &lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:h=&quot;http:\/\/java.sun.com\/jsf\/html&quot;&gt;  &lt;h:head&gt;     &lt;title&gt;JSF Demo&lt;\/title&gt; &lt;\/h:head&gt;  &lt;h:body&gt;     &lt;h:outputText value=&quot;CONVERSION RESULT&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:outputText value=&quot;1 m = 39.37 inches&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:form&gt;         &lt;h:commandButton action=&quot;back&quot; value=&quot;Convert another number&quot;\/&gt;     &lt;\/h:form&gt; &lt;\/h:body&gt;  &lt;\/html&gt;   <\/code><\/pre>\n<h4> \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 <\/h4>\n<p>  \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <em>faces-config.xml.<\/em> \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"xml\">&lt;?xml version='1.0' encoding='UTF-8'?&gt;  &lt;faces-config xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot;               xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;               xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-facesconfig_2_0.xsd&quot;               version=&quot;2.0&quot;&gt;     &lt;navigation-rule&gt;         &lt;from-view-id&gt;\/input_number.xhtml&lt;\/from-view-id&gt;         &lt;navigation-case&gt;             &lt;from-outcome&gt;result&lt;\/from-outcome&gt;             &lt;to-view-id&gt;\/result.xhtml&lt;\/to-view-id&gt;         &lt;\/navigation-case&gt;     &lt;\/navigation-rule&gt;     &lt;navigation-rule&gt;         &lt;from-view-id&gt;\/result.xhtml&lt;\/from-view-id&gt;         &lt;navigation-case&gt;             &lt;from-outcome&gt;back&lt;\/from-outcome&gt;             &lt;to-view-id&gt;\/input_number.xhtml&lt;\/to-view-id&gt;         &lt;\/navigation-case&gt;     &lt;\/navigation-rule&gt; &lt;\/faces-config&gt;   <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u0433\u043e\u0432 \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c. \u041d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0441\u0440\u0435\u0434\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 JSF.<br \/>  <strong>1. <\/strong>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b <em>faces-config.xml<\/em>. <br \/>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043e\u0442 <em>input_number.xhtml<\/em> \u043a <em>result.xhtml. <\/em><br \/>  <strong>2.<\/strong> \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <strong>Navigation<\/strong> \u0432 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/12e\/238\/ebb\/12e238ebb652cc66accf4303b81c9828.png\"\/><br \/>  <strong>3. <\/strong>\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043b <em>input_number.xhtml<\/em> \u0438\u0437 \u043e\u043a\u043d\u0430 <strong>Project<\/strong> \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440. \u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c <em>result.xhtml<\/em>.\u041d\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043b\u0438\u043d\u0438\u044e \u043e\u0442 <em>\/input_number.xhtml<\/em> \u043a <em>\/result.xhtml. <\/em><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a8a\/d6a\/595\/a8ad6a595abb6567230a74e5a5879a01.png\"\/><br \/>  <strong>4. <\/strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <strong>Structure<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/dff\/d85\/dcd\/dffd85dcd9a36884d0209674e809bbe1.png\"\/><br \/>  <strong>5. <\/strong>\u0412 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0440\u0430\u0441\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a <strong>Navigation Rules<\/strong> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <em>\/input_number.xhtml<\/em>.<br \/>  <strong>6. <\/strong>\u0412 \u043f\u043e\u043b\u0435 <strong>From Outcome<\/strong> \u0432\u0432\u0435\u0434\u0438\u0442\u0435 <em>result.<\/em><br \/>  <em><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a8a\/472\/283\/a8a4722838c6a6372ec1c8959ccc99ae.png\"\/><\/em><br \/>  <strong>7. <\/strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <strong>Text<\/strong> \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/385\/209\/b45\/385209b459eb8edb6f378281f89983b2.png\"\/><br \/>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043e\u0442 <em>\/result.xhtml<\/em> \u043a <em>\/input_number.xhtml.<\/em><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/8ab\/4b6\/cd9\/8ab4b6cd9a01fb8d317c8853b113d927.png\"\/><br \/>  \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443<strong> Text <\/strong>\u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/799\/32f\/7fd\/79932f7fd82111b4c854861a84b56ee5.png\"\/><\/p>\n<h5>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e.<br \/>  1. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448 CTRL+F10 \u0438\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 <strong>Run<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/31a\/4f1\/873\/31a4f1873d2e2925a5d7f8da8199b807.png\"\/><br \/>  \u0412 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 <strong>Update<\/strong> \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 <strong>Redeploy<\/strong> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u041e\u041a.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6e1\/db3\/eb1\/6e1db3eb11c4e10bb5938f1be106a1d4.png\"\/><br \/>  \u041f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435 \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f.<br \/>  <strong>2. <\/strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 URL-\u0430\u0434\u0440\u0435\u0441 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 <em>(http:\/\/localhost:8080). <\/em>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<br \/>  <strong>3. <\/strong>\u041d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <strong>Convert into inches<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3c3\/fc5\/bf5\/3c3fc5bf52d2a9209b9e9c2642a6a91d.png\"\/><br \/>  \u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 <em>result.<\/em><br \/>  <strong>4. <\/strong>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 <strong>Convert another number<\/strong>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ee7\/330\/796\/ee733079631df84fd21f7b69434b6127.png\"\/><br \/>  \u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u043d\u0430 \u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043d\u0430 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/h4>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u0443\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u043d\u0430 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e JSF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0432\u044f\u0436\u0435\u043c \u0435\u0433\u043e \u0441 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<br \/>  \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u0431\u0438\u043d\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0435\u0433\u043e \u0432 <em>faces-config.xml<\/em>. \u041c\u044b \u0431\u0443\u0434\u0435\u043c, \u043e\u0434\u043d\u0430\u043a\u043e, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c. \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430 \u0432 <em>faces-config.xml<\/em>. \u0417\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0438\u043d\u0430.<br \/>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b <em>faces-config.xml<\/em> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<pre><code class=\"xml\">  &lt;?xml version='1.0' encoding='UTF-8'?&gt;    &lt;faces-config xmlns=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee&quot;               xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;               xsi:schemaLocation=&quot;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-facesconfig_2_0.xsd&quot;               version=&quot;2.0&quot;&gt;     &lt;managed-bean&gt;       &lt;managed-bean-name&gt;converterBean&lt;\/managed-bean-name&gt;       &lt;managed-bean-class&gt;ConverterBean&lt;\/managed-bean-class&gt;       &lt;managed-bean-scope&gt;request&lt;\/managed-bean-scope&gt;     &lt;\/managed-bean&gt;     &lt;navigation-rule&gt;       &lt;from-view-id&gt;\/input_number.xhtml&lt;\/from-view-id&gt;       &lt;navigation-case&gt;         &lt;from-outcome&gt;result&lt;\/from-outcome&gt;         &lt;to-view-id&gt;\/result.xhtml&lt;\/to-view-id&gt;       &lt;\/navigation-case&gt;     &lt;\/navigation-rule&gt;     &lt;navigation-rule&gt;       &lt;from-view-id&gt;\/result.xhtml&lt;\/from-view-id&gt;       &lt;navigation-case&gt;         &lt;from-outcome&gt;back&lt;\/from-outcome&gt;         &lt;to-view-id&gt;\/input_number.xhtml&lt;\/to-view-id&gt;       &lt;\/navigation-case&gt;     &lt;\/navigation-rule&gt;   &lt;\/faces-config&gt;   <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043d\u0430\u043c\u0438 \u0440\u0430\u043d\u0435\u0435. <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ccb\/3e3\/910\/ccb3e3910837359a2cc5cb67bee1f501.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/87f\/bd7\/408\/87fbd7408bfda8ce1865759dd2bd3648.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/19e\/03c\/98a\/19e03c98a31c4ce4b73e085b01c2b37b.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ee5\/fc5\/999\/ee5fc59990cd685a53e005c3a9e82d83.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4d2\/04e\/5be\/4d204e5be9f76b09674fa8089cd399e3.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/168\/929\/947\/16892994787ad9ece08a0bf819f00e92.png\"\/><br \/>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>src <\/em>\u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b <em>ConverterBean.java<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ec7\/010\/38d\/ec701038d4fac473bb3727647f784c91.png\"\/><\/p>\n<h5>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435&nbsp;\u043a\u043b\u0430\u0441\u0441\u0430 ConverterBean<\/h5>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 <em>(result)<\/em> \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043d\u0435\u0433\u043e. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"java\">public class ConverterBean {     private String result;      public String getResult() {         return result;     }       public void setResult(String result) {         this.result = result;     } }   <\/code><\/pre>\n<p>  <strong>1. <\/strong>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 SHIFT+ENTER \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 <em>public class ConverterBean {. <\/em><br \/>  <strong>2. <\/strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f:  <\/p>\n<pre><code class=\"java\">private String result;   <\/code><\/pre>\n<p>  <strong>3.&nbsp;<\/strong>\u041f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u043a\u0443\u0440\u0441\u043e\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <em>result <\/em>\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448 ALT+ENTER, \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u043c\u0435\u043d\u044e \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <strong>Create getter and setter for &#8216;result&#8217;<\/strong>. <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e4e\/39c\/771\/e4e39c77148c3e9e550ffe111e7b4425.png\"\/><br \/>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b <em>getResult()<\/em> \u0438 <em>setResult(). <\/em>\u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b, \u043a\u0430\u043a \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 (\u0441\u0435\u0440\u044b\u043c).<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6c2\/53a\/57d\/6c253a57d837f6b50ab8b29ab7d4e9d8.png\"\/><br \/>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u0435 <em> result<\/em> \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 <em>input_number<\/em> \u0438 <em>result.<\/em><\/p>\n<h5>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u0435 \u0431\u0438\u043d\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 input_number.xhtml<\/h5>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b <em>input_number.xhtml<\/em> \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;  &lt;!DOCTYPE html         PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot;         &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;  &lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:h=&quot;http:\/\/java.sun.com\/jsf\/html&quot;&gt;  &lt;h:head&gt;     &lt;title&gt;JSF Demo&lt;\/title&gt; &lt;\/h:head&gt;  &lt;h:body&gt;     &lt;h:outputText value=&quot;METERS TO INCHES CONVERSION&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:form&gt;         &lt;h:outputText value=&quot;Enter amount in meters (m):&quot;\/&gt;&nbsp;         &lt;h:inputText value=&quot;#{converterBean.result}&quot; size=&quot;16&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;         &lt;h:commandButton action=&quot;result&quot; value=&quot;Convert into inches&quot;\/&gt;     &lt;\/h:form&gt; &lt;\/h:body&gt;  &lt;\/html&gt;   <\/code><\/pre>\n<p>  <strong>1. <\/strong>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <em>input_number.xhtml<\/em>. <br \/>  <strong>2. <\/strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 <em>value=&quot;#{converterBean.result}&quot; <\/em>\u0432 \u0442\u0435\u0433<em> &lt;h:inputText&gt;<\/em>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b9b\/296\/60a\/b9b29660a95babf5268d6ff41ec5d375.png\"\/><br \/>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>value <\/em>\u0432 \u0444\u0430\u0439\u043b\u0435 <em>result.xhtml.<\/em><br \/>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<h5>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441 ConverterBean<\/h5>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>setResult <\/em>\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"java\">public void setResult(String result) {         double conversionFactor = 39.37;         double metersToConvert = Double.parseDouble(result);         double inches = conversionFactor*metersToConvert;         String inchesString = Double.toString(inches);         this.result = result + &quot; m = &quot; + inchesString + &quot; inches&quot;;     }   <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<h4>\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041d\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044f \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<br \/>  <strong>1. <\/strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432 \u043c\u0435\u0442\u043e\u0434 <em>setResult()<\/em>  <\/p>\n<pre><code class=\"java\"> public void setResult(String result) {         double conversionFactor = 39.37;         try {             double metersToConvert = Double.parseDouble(result);             double inches = conversionFactor*metersToConvert;             String inchesString = Double.toString(inches);             this.result = result + &quot; m = &quot; + inchesString + &quot; inches&quot;;         } catch (NumberFormatException e) {             this.result = &quot;\\&quot;&quot; + result + &quot;\\&quot; is not a number.&quot;;             if (result.isEmpty()) this.result = &quot;You forgot to specify the number of meters.&quot;;         }     }    <\/code><\/pre>\n<p>  <strong>2. <\/strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0434 \u0434\u0432\u0443\u0445 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0432 \u043a\u043b\u0430\u0441\u0441 <em>ConverterBean<\/em>. \u041f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 (<em>conversionSummary<\/em>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 (CONVERSION RESULT \u0438\u043b\u0438 CONVERSION FAILED). \u0412\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u0435 (<em>buttonLabel<\/em>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 (<em>Convert another number<\/em>, \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0430\u0441\u044c \u0438 <em>Try once more <\/em>\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438).<br \/>  \u041a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"java\">public class ConverterBean {     private String result;     private String conversionSummary;     private String buttonLabel;      public String getResult() {         return result;     }      public void setResult(String result) {         double conversionFactor = 39.37;         try {             double metersToConvert = Double.parseDouble(result);             double inches = conversionFactor*metersToConvert;             String inchesString = Double.toString(inches);             this.result = result + &quot; m = &quot; + inchesString + &quot; inches&quot;;             setConversionSummary(&quot;CONVERSION RESULT&quot;);             setButtonLabel(&quot;Convert another number&quot;);         } catch (NumberFormatException e) {             this.result = &quot;\\&quot;&quot; + result + &quot;\\&quot; is not a number.&quot;;             if (result.isEmpty()) this.result = &quot;You forgot to specify the number of meters.&quot;;             setConversionSummary(&quot;CONVERSION FAILED&quot;);             setButtonLabel(&quot;Try once more&quot;);         }     }      public String getConversionSummary() {         return conversionSummary;     }      public void setConversionSummary(String conversionSummary) {         this.conversionSummary = conversionSummary;     }      public String getButtonLabel() {         return buttonLabel;     }      public void setButtonLabel(String buttonLabel) {         this.buttonLabel = buttonLabel;     } }   <\/code><\/pre>\n<p>  <strong>3. <\/strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 \u0444\u0430\u0439\u043b <em>result.xhtml<\/em>.  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;  &lt;!DOCTYPE html         PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot;         &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;  &lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:h=&quot;http:\/\/java.sun.com\/jsf\/html&quot;&gt;  &lt;h:head&gt;     &lt;title&gt;JSF Demo&lt;\/title&gt; &lt;\/h:head&gt;  &lt;h:body&gt;     &lt;h:outputText value=&quot;#{converterBean.conversionSummary}&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:outputText value=&quot;#{converterBean.result}&quot;\/&gt;&lt;br\/&gt;&lt;br\/&gt;     &lt;h:form&gt;         &lt;h:commandButton action=&quot;back&quot; value=&quot;#{converterBean.buttonLabel}&quot;\/&gt;     &lt;\/h:form&gt; &lt;\/h:body&gt;  &lt;\/html&gt;   <\/code><\/pre>\n<p>  \u0412\u0441\u0435. \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0440\u0430\u0431\u043e\u0442\u0435.<br \/>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e64\/ad0\/2fb\/e64ad02fba3c676d8de63320891dc0e5.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/810\/f2e\/b3d\/810f2eb3d9fc05bdfd070a544b4712db.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/0a8\/150\/bb0\/0a8150bb034e9c1cf8e38fab1853bb0c.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/94c\/218\/919\/94c218919cbb55a7fa56bf2359a0a3af.png\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0442\u0435\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430, \u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/192434\/\"> http:\/\/habrahabr.ru\/post\/192434\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <a href=\"http:\/\/habrahabr.ru\/post\/190006\/\">\u0427\u0430\u0441\u0442\u044c 1.<\/a><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0438\u0437 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0434\u044e\u0439\u043c\u044b.<br \/>  \u0415\u0441\u043b\u0438 \u0442\u0435\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430, \u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<h4> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/h4>\n<p>  \u041b\u044e\u0431\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432 IntelliJ Idea \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 Java-\u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 GlassFish.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-192434","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=192434"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192434\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}