Dear ivy team,

I building an JSP page in ivy, use Web Element to load that jsp page

alt text

Here is content of that page:

alt text I try to import two javascript files to page, but got exception:

InvalidFormatException: > didn't match format: <No closing tag found!>
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)

This happen when i import js via script tag with relative resource. When i change to a external link like alt text Then everything is fine.

My question is:

  • What is different between two ways on ivy? does ivy try to read js file then validate it when we using relative path?

You could see full stacktrace at here and index.js, configuration2.js

Thanks and hope you can help.

P/S: when i try with HtmlUserDialog, it's seem to work. but my page is React and need to use JSP.

asked 01.11.2018 at 08:10

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 01.11.2018 at 08:11

One more hint i see in stacktrace is my script it mention:

> didn't match format No closing tag found!

and the script start with <(function () { .

somehow ivy auto add < to starting of script. but missing > at the end so this issue occur

(01.11.2018 at 21:59) trungdv trungdv's gravatar image

Hi The Script Expander looks for <%=expression%> or <%code%> to replace/execute ivy script code. But you have <%s> which he can not find the end tag '%>'. I think that is the problem.

Where did you put your script file in ivy?

(02.11.2018 at 05:51) SupportIvyTeam ♦♦ SupportIvyTeam's gravatar image

hi @SupportIvyTeam ♦♦

i put this js file on <myproject>/webcontent/resources/js

and load it on JSP page as image on this question.

(02.11.2018 at 05:57) trungdv trungdv's gravatar image

Hi

An easy workaround would be to replace all '<%' with '< %' in your script.

(02.11.2018 at 06:08) SupportIvyTeam ♦♦ SupportIvyTeam's gravatar image

hi @SupportIvyTeam ♦♦

Thanks for your information, i have removed all <% from my script and somehow it works.

But i think we should enhance this validator because the <% is appear inside the text like

warning$1(false, "<%s /> is using incorrect casing...")

then it would not be an EL expression.

Even when i comment out that line, problem still happen.

Thanks again

(02.11.2018 at 06:11) trungdv trungdv's gravatar image

Hi @SupportIvyTeam ♦♦ it works when i replace <% to < %

(02.11.2018 at 06:13) trungdv trungdv's gravatar image
showing 5 of 6 show 1 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7

Asked: 01.11.2018 at 08:10

Seen: 2,271 times

Last updated: 02.11.2018 at 06:13