dynamic generation of javascript source link

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dynamic generation of javascript source link

sagargaikwad
I have JSP file in which src attribute of script tag is set as follows

<script type="text/javascript" src="<%= DexProperties.getWwwJsRoot() %>/jquery/jquery-1.4.3.min.js"></script>

I am trying to convert this JSP page to thyme. How should I specify this tag in new modified JSP

Something like this should work

<script type="text/javascript" th:src="${dexProperties.wwwJsRoot}/jquery/jquery-1.4.3.min.js"></script>
Reply | Threaded
Open this post in threaded view
|

Re: dynamic generation of javascript source link

danielfernandez
Administrator
You should append your literal suffix to the evaluated expression, like:

    <script type="text/javascript" th:src="${dexProperties.wwwJsRoot} + '/jquery/jquery-1.4.3.min.js'"></script>
Reply | Threaded
Open this post in threaded view
|

Re: dynamic generation of javascript source link

sagargaikwad
Thanks. It worked.