<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: InvalidFormatException when importing java script on JSP page</title><link>https://answers.axonivy.com/questions/3520/invalidformatexception-when-importing-java-script-on-jsp-page</link><description>&lt;p&gt;Dear ivy team,&lt;/p&gt;
&lt;p&gt;I building an JSP page in ivy, use Web Element to load that jsp page&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/cob-page-structures.png"&gt;&lt;/p&gt;
&lt;p&gt;Here is content of that page:&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/cob-page-structures_S8qlK57.png"&gt;
I try to import two javascript files to page, but got exception:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;InvalidFormatException: &amp;gt; didn't match format: &amp;lt;No closing tag found!&amp;gt;
at ch.ivyteam.ivy.scripting.internal.expander.TextTagExpander.getNextToExpand(TextTagExpander.java:147)
at ch.ivyteam.ivy.scripting.internal.expander.TextTagExpander.getNextToExpand(TextTagExpander.java:80)
at ch.ivyteam.ivy.scripting.internal.expander.EmbeddedScriptExpander.expandEmbeddedScripts(EmbeddedScriptExpander.java:81)
at ch.ivyteam.ivy.scripting.internal.expander.EmbeddedScriptExpander.expandEmbeddedScripts(EmbeddedScriptExpander.java:56)
at ch.ivyteam.ivy.macro.internal.MacroExpander.expandMacros(MacroExpander.java:76)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This happen when i import js via script tag with relative resource.
When i change to a external link like
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/cob-page-structures_imu9DbS.png"&gt;
Then everything is fine.&lt;/p&gt;
&lt;p&gt;My question is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is different between two ways on ivy? does ivy try to read js file then validate it when we using relative path?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You could see full stacktrace at &lt;a href="https://raw.githubusercontent.com/trungdoviet/import-script-exception/master/stracktrace.txt"&gt;here&lt;/a&gt;
and &lt;a href="https://github.com/trungdoviet/import-script-exception/blob/master/index.js"&gt;index.js&lt;/a&gt;, &lt;a href="https://github.com/trungdoviet/import-script-exception/blob/master/configuration2.js"&gt;configuration2.js&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks and hope you can help.&lt;/p&gt;
&lt;p&gt;P/S: when i try with HtmlUserDialog, it's seem to work. but my page is React and need to use JSP.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3520/invalidformatexception-when-importing-java-script-on-jsp-page" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 30 Jul 2024 12:03:33 -0000</lastBuildDate></channel></rss>