<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to call external JS file (path set)</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=3425608" />
  <subtitle>How to call external JS file (path set)</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=3425608</id>
  <updated>2026-07-13T05:17:23Z</updated>
  <dc:date>2026-07-13T05:17:23Z</dc:date>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10355236" />
    <author>
      <name>Thiago Leão Moreira</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10355236</id>
    <updated>2011-08-08T15:18:24Z</updated>
    <published>2011-08-08T15:18:24Z</published>
    <summary type="html">You are developing your portlet in the wrong way, That&amp;#39;s why the configurations are not working as expected. You SHOULDN&amp;#39;T change anything on liferay-portal-6.0.6\tomcat-6.0.29\webapps\&lt;strong&gt;ROOT&lt;/strong&gt;. &lt;br /&gt;  This documentation teach you how to develop portlet right &lt;a href="http://www.liferay.com/pt/documentation/liferay-portal/6.0/development/-/ai/portlet-development"&gt;Portlet developoment&lt;/a&gt;</summary>
    <dc:creator>Thiago Leão Moreira</dc:creator>
    <dc:date>2011-08-08T15:18:24Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10348651" />
    <author>
      <name>Manikandan S</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10348651</id>
    <updated>2011-08-08T04:40:58Z</updated>
    <published>2011-08-08T04:40:58Z</published>
    <summary type="html">Hi Thiago,&lt;br /&gt;I have created one portlet in  liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\html\portlet\book\view.jsp&lt;br /&gt;And my js file is in  liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\html\portlet\book\js\main.js&lt;br /&gt;Then my liferay-portlet.xml file,&lt;br /&gt;	&amp;lt;portlet&amp;gt;&lt;br /&gt;		&amp;lt;portlet-name&amp;gt;book&amp;lt;/portlet-name&amp;gt;&lt;br /&gt;		&amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt;&lt;br /&gt;		&amp;lt;header-portlet-javascript&amp;gt;/html/portlet/book/js/main.js&amp;lt;/header-portlet-javascript&amp;gt;&lt;br /&gt;	&amp;lt;/portlet&amp;gt;&lt;br /&gt;If I remove &amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt; my js file is not rendering if I call from jsp file.&lt;br /&gt;If I include &amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt; my js file is rendering but if I make any changes in js file it is affecting after I restart the tomcat server.&lt;br /&gt;I don&amp;#39;t why its happening?&lt;img alt="emoticon" src="@theme_images_path@/emoticons/sad.gif" &gt;</summary>
    <dc:creator>Manikandan S</dc:creator>
    <dc:date>2011-08-08T04:40:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10342804" />
    <author>
      <name>Thiago Leão Moreira</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10342804</id>
    <updated>2011-08-05T23:54:37Z</updated>
    <published>2011-08-05T23:54:37Z</published>
    <summary type="html">Hey Mani,&lt;br /&gt;&lt;br /&gt;  The &amp;lt;instanceable&amp;gt; tag does not have any influence in the javascript rendering.</summary>
    <dc:creator>Thiago Leão Moreira</dc:creator>
    <dc:date>2011-08-05T23:54:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10336395" />
    <author>
      <name>Manikandan S</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10336395</id>
    <updated>2011-08-05T09:54:13Z</updated>
    <published>2011-08-05T09:54:13Z</published>
    <summary type="html">Still no help from Liferay Team?&lt;img alt="emoticon" src="@theme_images_path@/emoticons/mellow.gif" &gt;</summary>
    <dc:creator>Manikandan S</dc:creator>
    <dc:date>2011-08-05T09:54:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10004447" />
    <author>
      <name>Manikandan S</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10004447</id>
    <updated>2011-07-14T12:17:26Z</updated>
    <published>2011-07-14T12:17:26Z</published>
    <summary type="html">Hi,&lt;br /&gt;Is it necessary to include &amp;#34;&amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt;&amp;#34; in liferay-portlet.xml file?&lt;br /&gt;In my portlet class if i remove &amp;#34;&amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt;&amp;#34; it seems not working, if it placed then it is working&lt;br /&gt;Then, if i make changes in my js file Liferay tomcat forced me to restart the sever.&lt;br /&gt;What&amp;#39;s wrong?&lt;br /&gt;&lt;br /&gt;In my liferay-portlet.xml file,&lt;br /&gt;&amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/html/portlet/book/author/main.js&amp;lt;/header-portlet-javascript&amp;gt;</summary>
    <dc:creator>Manikandan S</dc:creator>
    <dc:date>2011-07-14T12:17:26Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3566904" />
    <author>
      <name>Albert J Carter-Corbin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3566904</id>
    <updated>2009-07-14T20:03:10Z</updated>
    <published>2009-07-14T20:03:10Z</published>
    <summary type="html">Yes you can.  I am using a tree library from webfx.  I also created my own javascript that I included after I included the webfx javascript code.&lt;br /&gt;&lt;br /&gt;So you can have multiple header-portlet-javascript elements in your liferay-portlet.xml file.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/js/webfx/webfx.js&amp;lt;/header-portlet-javascript&amp;gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/js/scripts.js&amp;lt;/header-portlet-javascript&amp;gt;</summary>
    <dc:creator>Albert J Carter-Corbin</dc:creator>
    <dc:date>2009-07-14T20:03:10Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3565414" />
    <author>
      <name>Gnaniyar Zubair</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3565414</id>
    <updated>2009-07-14T16:53:04Z</updated>
    <published>2009-07-14T16:53:04Z</published>
    <summary type="html">Hi albert,&lt;br /&gt;&lt;br /&gt;that way also we can include the js file. but if i want to include many js files, how to do?&lt;br /&gt;&lt;br /&gt;can i include like this?&lt;br /&gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/js/appointment/testing1.js&amp;lt;/header-portlet-javascript&amp;gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/js/appointment/testing2.js&amp;lt;/header-portlet-javascript&amp;gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/js/appointment/testing3.js&amp;lt;/header-portlet-javascript&amp;gt;&lt;br /&gt;&lt;br /&gt;.......etc&lt;br /&gt;&lt;br /&gt;Thanks in advance</summary>
    <dc:creator>Gnaniyar Zubair</dc:creator>
    <dc:date>2009-07-14T16:53:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3431499" />
    <author>
      <name>Albert J Carter-Corbin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3431499</id>
    <updated>2009-06-30T01:10:14Z</updated>
    <published>2009-06-30T01:10:14Z</published>
    <summary type="html">You can also add an entry in the liferay-portal.xml file. &lt;br /&gt;&lt;br /&gt;&amp;lt;header-portlet-javascript&amp;gt;/js/testing.js&amp;lt;/header-portlet-javascript&amp;gt;&lt;br /&gt;&lt;br /&gt;This mechanism will add the reference to the javascript file once even if there were multiple instances of the portlet on the page.</summary>
    <dc:creator>Albert J Carter-Corbin</dc:creator>
    <dc:date>2009-06-30T01:10:14Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3425733" />
    <author>
      <name>Gnaniyar Zubair</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3425733</id>
    <updated>2009-06-29T11:35:46Z</updated>
    <published>2009-06-29T11:35:46Z</published>
    <summary type="html">HI,&lt;br /&gt;&lt;br /&gt;you can create that file inside &lt;strong&gt;ext-web/html/js&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;and you can set that path inside your jsp file like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;script src=&amp;#34;&lt;strong&gt;/html/js/testing.js&lt;/strong&gt;&amp;#34; type=&amp;#34;text/javascript&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;HTH</summary>
    <dc:creator>Gnaniyar Zubair</dc:creator>
    <dc:date>2009-06-29T11:35:46Z</dc:date>
  </entry>
  <entry>
    <title>How to call external JS file (path set)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3425607" />
    <author>
      <name>Aruny Jayatissa</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3425607</id>
    <updated>2009-06-29T11:16:52Z</updated>
    <published>2009-06-29T11:16:52Z</published>
    <summary type="html">Hi , &lt;br /&gt;&lt;br /&gt;I wanted to add external JS file to the portlet. How can I set the path?&lt;br /&gt;&lt;br /&gt;Thanks, &lt;br /&gt;Arunyka</summary>
    <dc:creator>Aruny Jayatissa</dc:creator>
    <dc:date>2009-06-29T11:16:52Z</dc:date>
  </entry>
</feed>
