<html:link href="/dnweb/displayFindDeviceId.do" styleClass="small" onclick="appendHref(this)">
<bean:message key="link.find"/>
</html:link>
The above code having context name as “/dnweb”. This is given as hardcoded. But i need it as dynamically.
If you changed the context name to your project. Automatically it has to be changed. How can i do for this.
i have the code as
<html:link href="${pageContext.request.contextPath}/displayFindDeviceId.do"
But this is giving an error.
i set the context path using html taglib tag i can set the context path using a variable by using scriptliet tags like
i took variable urlName to collect contextPath here.
As per this code it is working fine in my localhost.
Thanks to Bozho and JB.