i never faced such situation. do it only if you have a very valid reason.I cant even think of a scenario where this might be useful.
If you are faced with such a situation, you better think over your logic again. You will face more problems in the long run.
The time for mis-using JSPs in such manner is long past. Best accepted practices dictate that JSPs should be used for view generation and not for other types of uses. Scriptlets, including the scriptlet declarations necessary to create methods are discredited and should no longer be used. Modern techniques such as the JSTL, EL, EL functions and custom tags are what you should be exploring.
Actually, the best implementation is JSP only used for View from an integration..
People sometimes prefer to use the integration between..
JPA-EJB-Servlet-JSP this is the integration standardized..
and sometimes, people use other integration...
and from all of that integrations, JSP only used for View..
which has main action to render/consume data from/to Controller..
the Controller in this integration case is Servlet..
Please correct me if i'm wrong...
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Get out of my mind! Look! A tiny ad!
Devious Experiments for a Truly Passive Greenhouse!