Custom tag containing generated JSTL : not interpreted

I have a custom tag that has no body at all. I'm trying to replace the empty body with, for simplicity's sake, "[<c:out value="SUCCESS!"/>]". The goal is to see "[SUCCESS!]" displayed by the JSP which uses the tag, but all I see is "[]" and if I look at the generated source code, I can see that the <c:out statement is written on the page between the brackets, but not interpreted.

Is there a common way to achieve this ? The final goal will be to use other custom tags instead of the "<c:out" tag. The content will come from a database.
I tried different techniques with SimpleTagSupport and BodyTagSupport but none of those were successfull. I'm not sure if it is technically possible to do it, but then how should this be done ?

The problem is that if the body of a tag is empty at first (and compiled like this, AKA translated into a servlet like this), and if, once the request is sent, the java code that corresponds to the tag finds out, after accessing the database, that the body of the tag should be another custom tag, that other custom tag cannot be rendered correctly since the JSP has already been compiled before.. Is there any common solution for this issue ? Or a less common solution ? That other custom tag could very well have to access the database as well and find out that its own body should be another custom tag, and so on.

Once the page is hit, the Java code that corresponds to the "myTag" tag goes into the data base and find out that the result becomes :

where anotherTag also fetches content in database, could find out that its body should be yet another tag etc..

==> the "test:anotherTag" cannot be rendered correctly because when the JSP was compiled, the tag was not present on it. On some page hits, it would not be "anotherTag" that would be the body of the "myTag", but for example "yetAnotherDifferentTag"'.

To answer the question another way: No, you can't generate jsp/tag code from your jsp/tag code and expect to have it evaluated.
By the time you are running your page/tag file it's already converted to a servlet/SimpleTag and compiled into bytecode.

Jsp/tag code results in html template text. So you can't as part of that code load jsp/tag code from the database and translate/compile it on the fly.

Is the 'code' in the database expected to change at runtime at all?
I would convert the 'code' in the database into tag files. One tag file for each row in the database.
Then a simple database lookup and a switch statement would decide which tag to execute.