Hi,
Im not sure this will work or not, but u can try it.
In the m.jsp, u can put an if condition to check which file is it being called in by and the accordingly disable the link in m.jsp.
u can use request.getRequestURI() to get the whole path of the file called and request.getContextPath() to get the folder where the called file is stored.
here is example.
let us assume that a.jsp includes m.jsp and a.jsp is stored in /its folder from root.
then request.getRequestURI() will return /its/a.jsp
and
request.getContextPath() will return /its
perform
string operations on the return string to get the file called i.e.
fileCalled =replace(request.getRequestURI(),request.getContextPath(),"");
replace function is not standard string function, u will have to write it or u can get it by downloading StringHelper class from
http://ostermiller.org/utils/StringHelper.html then check if fileCalled = a.jsp then disable link for a.jsp etc.
Let me know, if it was helpful.
Im in hurry now,
if u want i can help u with code later.
Regards,
Piyush