<% RenderingContext context = (RenderingCon text)request.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);
String currentPath = context.getPath();
String currentLibrary = context.getLibrary().getName();
Map myparams = new HashMap();
myparams.put("SiteAreas", currentLibrary+"/mySite/mySiteArea1,"+currentLibrary+"/mySite/mySiteArea2"); %>
Another technique is
<%
RenderingContext context = (RenderingContext)request.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY); %>
<% String currentPath = context.getPath(); //Getting the library relative path(Ex : /Library/Site/Sitearea/Content)
<% String currentPath = context.getPath(); //Getting the library relative path(Ex : /Library/Site/Sitearea/Content)
String lrp=context.getLibraryRelativePath();
String sublrp=lrp.substring(0,lrp.lastIndexOf("/"));
String currentLibrary =context.getLibrary().getName();
Map myparams=context.getRequestParameters();
myparams.put("sitearea", currentLibrary+sublrp); context.setRequestParameters(myparams); %>
Render the content in menu using below statment: