简体   繁体   中英

What's the equivalent of C++'s “#ifdef #endif” macro in JSP?

What's the equivalent of C++'s #ifdef #endif macro in JSP? Is there such thing in JSP?

I want to conditionally include files in one JSP or another. Reason for doing that is because I have a nested setup (nested jquery ui tabs). I prefer to include files in the outermost layer for the "release" version. But for the "debug" version, I prefer to include file in the inner layers so I can debug individual pages. I'm using <%@ include ... %> to include files.

If it's possible, how would you implement that? I think JSP include action ( <jsp:include> ) would work, but that's probably slower than JSP include directives.

Thanks.

There is no direct equivalent. Check this thread. And probably this can shed some light as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM