Questions Tagged With jsphttps://answers.axonivy.com/tags/jsp/?type=rss&user=trungdvquestions tagged <span class="tag">jsp</span>enThu, 01 Nov 2018 08:10:53 -0400InvalidFormatException when importing java script on JSP pagehttps://answers.axonivy.com/questions/3520/invalidformatexception-when-importing-java-script-on-jsp-page<p>Dear ivy team,</p> <p>I building an JSP page in ivy, use Web Element to load that jsp page</p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/cob-page-structures.png"></p> <p>Here is content of that page:</p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/cob-page-structures_S8qlK57.png"> I try to import two javascript files to page, but got exception:</p> <pre><code>InvalidFormatException: &gt; didn't match format: &lt;No closing tag found!&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) </code></pre> <p>This happen when i import js via script tag with relative resource. When i change to a external link like <img alt="alt text" src="https://answers.axonivy.com/upfiles/cob-page-structures_imu9DbS.png"> Then everything is fine.</p> <p>My question is:</p> <ul> <li>What is different between two ways on ivy? does ivy try to read js file then validate it when we using relative path?</li> </ul> <p>You could see full stacktrace at <a href="https://raw.githubusercontent.com/trungdoviet/import-script-exception/master/stracktrace.txt">here</a> and <a href="https://github.com/trungdoviet/import-script-exception/blob/master/index.js">index.js</a>, <a href="https://github.com/trungdoviet/import-script-exception/blob/master/configuration2.js">configuration2.js</a></p> <p>Thanks and hope you can help.</p> <p>P/S: when i try with HtmlUserDialog, it's seem to work. but my page is React and need to use JSP.</p>trungdvThu, 01 Nov 2018 08:10:53 -0400https://answers.axonivy.com/questions/3520/invalidformatexception-when-importing-java-script-on-jsp-pagejsp