java - how to handle base url in jsp -


in asp.net, can use ~/jquery.js means jquery.js in root folder. how know root jsp?

actually /jquery.js didnot work, suppose run our app in http://mypcname.com:8084/131x/ ~/jquery.js in asp.net goes http://mypcname.com:8084/131x/jquery.js /jquery.js go http://mypcname.com:8084/jqeury.js

use include js file.

<script src="${pagecontext.request.contextpath}/jquery.js"></script> 

you can detailed answer here.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -