I can't understand why. WHYYY!! I mean simple things might work such as <a title="<%somecode()%>"> but complex things like this will never work since then we need to make a JSP interpreter in JavaScript:
<table>
<%for (int i = 0; i < 10; i++) {%>
<tr>
<td>X</td>
</tr>
<%}%>
</table>
So why try at all. End users shouldn't be bothered with JSP logic anyway. There are security implications, it's impractical and makes little sense since you won't get a preview or WYSIWYG experience anyway.
If it's for some template design why not use a non richtext area a simple textbox since the user who is supposed to fiddle with the code needs to be a skilled JSP developer anyway and then they would be able to see all code not hidden away in a richtext environment.
We designed TinyMCE to be used by endusers with little or no knowledge of HTML. So we don't have a focus to make it more complex and handle backend code as well. It's designed to be a richtext editor with wysiwyg capabilities of (X)HTML code. If you need it for something else you need to use thirdparty plugins like the codeprotect plugin that's available at SF.
I've been tempted to add this plugin to the core package of TinyMCE. But when I think of it for a while I understand that it would take this project in the wrong direction. We don't want to go the code editor route and make a dreamweaver application for the web.
Best regards,
Spocke - Main developer of TinyMCE