How to use contextPath in html template

160
August 01, 2018, at 3:50 PM

I want to know how to use contextPath in html code.

For example, if I load html code like below dynamically in runtime how to use contextPath?? (It is html template, no jsp)

<div>
    <ul>
        <li><a href="/contextPath/folder1/file1.do">menu1</a></li>
        <li><a href="/contextPath/folder2/file2.do">menu2</a></li>
        <li><a href="/contextPath/folder3/file3.do">menu3</a></li>
    </ul>
 </div>

*After load html, add contextPath on tag's href attribute using jquery??

please help.

Rent Charter Buses Company
READ ALSO
String path to Json

String path to Json

I have the list of paths like below

182
jQuery if condition not working when screen is small (mobile)

jQuery if condition not working when screen is small (mobile)

i have a simple jquery condition which is simply checking a css value as shown below

164
Accessing Table in Partial View

Accessing Table in Partial View

I'm trying to edit a table by adding rows, but running into an issue with the the partial view not being fully rendered (This is my assumption)

198
How to remove value by id from JSON file?

How to remove value by id from JSON file?

I have small project where I need to be able to insert/edit/delete records from JSON fileI use http://myjson

134