In our templates, we have conditional statements based on the render mode that determine whether (some of) the JSP code will be emitted. (Obviously, in an old-school preview, you don't want JSP code, while on a published page, you have an application server available.) Suffice it to say that in Preview mode, our JSP code won't execute, even on the application server.
Experience manager uses the preview render. My first question is why on earth this might be the logical choice, as Experience Manager pages are served from an application/web server. Would it be a bad customisation to force it to use Publish mode?
Is there any way to get Experience Manager to use the Publish render mode? I'm not aware of a configuration setting. Perhaps in the events system we could modify the publish instruction, but then we'd have to be able to detect renders that were coming from Experience Manager? Is this possible? What other approaches might be viable?