{"id":3929,"date":"2014-03-30T06:25:17","date_gmt":"2014-03-30T06:25:17","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-jsp-fragments-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:25:17","modified_gmt":"2014-03-30T06:25:17","slug":"problem-about-jsp-fragments-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-jsp-fragments-collection-of-common-programming-errors\/","title":{"rendered":"problem about jsp-fragments-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f53125b59305a81a346f1890b38bf062?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npalAlaa<br \/>\njava jsp include jsp-fragments<br \/>\nI want to make include jspf into index jsp page , these statements &lt;%&#8211; any content can be specified here e.g.: &#8211;%&gt; &lt;%@ page pageEncoding=&#8221;UTF-8&#8243; %&gt;aappears in the index page !!here&#8217;s the include line in index page&lt;jsp:include page=&#8221;WEB-INF\/jspf\/Header.jspf&#8221; \/&gt;Note : I make head and body in the index page only, can some body tell me why the first lines appears in the index page?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c4715b6fef86642b99141c9a3a390190?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlptugay<br \/>\njsp glassfish memory-management jspinclude jsp-fragments<br \/>\nWe have a web page, running on a glassfish server. In our jsp file we have a lot of includes like the one below.&lt;jsp:directive.include file=&#8221;johndoe\/foobar.jspf&#8221;\/&gt;These files are included according to the user choice. Our jsp file is basically like this:&lt;jsp:root version=&#8221;2.1&#8243; xmlns:c=&#8221;http:\/\/java.sun.com\/jstl\/core_rt&#8221; xmlns:f=&#8221;http:\/\/java.sun.com\/jsf\/core&#8221; xmlns:h=&#8221;http:\/\/java.sun.com\/jsf\/html&#8221; xmlns:jsp=&#8221;http:\/\/java.sun.com\/JSP\/Page&#8221; xmlns:webuijsf=&#8221;http:\/\/www.sun.com\/webui\/webuijs<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/26d7b31da814155de274bc19f5c5f82f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMike<br \/>\njquery jsp icanhaz.js jsp-fragments<br \/>\nI have the following code saved in a .jspf file:&lt;!&#8211; include library files &#8211;&gt; &lt;script src=&#8221;jquery.js&#8221;&gt;&lt;\/script&gt; &lt;script src=&#8221;icanhaz.js&#8221;&gt;&lt;\/script&gt;&lt;script type=&#8221;text\/html&#8221; id=&#8221;user&#8221;&gt; Hello my name is {{ name }} &lt;\/script&gt;&lt;script type=&#8221;text\/javascript&#8221;&gt;$(document).ready(function () {user_data_object = {name: &#8220;Michael&#8221;};&lt;!&#8211; This should set user to the string &#8216;Hello my name is Michael&#8217;.However, ich.user is undefined, so when I make this call, I get<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>palAlaa java jsp include jsp-fragments I want to make include jspf into index jsp page , these statements &lt;%&#8211; any content can be specified here e.g.: &#8211;%&gt; &lt;%@ page pageEncoding=&#8221;UTF-8&#8243; %&gt;aappears in the index page !!here&#8217;s the include line in index page&lt;jsp:include page=&#8221;WEB-INF\/jspf\/Header.jspf&#8221; \/&gt;Note : I make head and body in the index page only, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3929","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3929"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3929\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}