No. You're limited to valid
Java code. ;-) But seriously, it's just another method like any other, so theoretically you could put any logic in there that you want, right?
<soapbox>
I personally don't like to use
ANY scriptlet code in my JSPs, but I guess that's just personal taste. If you're just prototyping, by all means do so, but if you're trying to develop JSPs that will be used by others, it's better to go with a tag library (such as JSTL) which makes the page more readable.
</soapbox>