In my JSP page, I am including another JSP and I want to restrict it based on the view of source page either mobile or web.
<%@include file="/templates/jsp/header/search.jsp" %>
This is my include statement and I have a JavaScript function which determines whether is a desktop view or not. Below is my JS function:
function isDesktopView(){
if (bootstrapEnv == "lg" || bootstrapEnv == "md") {
return true;
}
}
I was trying to something like
<s:if test = "%{isDesktopView()}">
<%@include file="/templates/jsp/header/search.jsp" %>
</s:if>