Hello
JSP experts, any advice on this JSP problem?
I have two JSP/servlet applications called “SimpleQuantity” and “DoWork”. DoWork wants to use a “quantity” generated and displayed by the SimpleQuantity app. I’m writing DoWork now and don’t want to modify or duplicate the code in the stand-alone SimpleQuantity app. DoWork will invoke the SimpleQuantity app via redirect (either to a new browser instance or to a frame target in the same browser; doesn’t matter?). SimpleQuantity fortunately stores its resulting “quantity” in “its” session object, as well as displaying it in its HTML output. I hope that DoWork can then get this “quantity” from the session object (when SimpleQuantity completes). I believe there is only one session object here because DoWork did a redirect to SimpleQuantity rather than forward.
My question(s):
1. Is this “the right” approach in the JSP world? Is there another “proper” way to seamlessly integrate such JSP applications without having to modify the existing app?
2. If “session” object might work, is there a way for DoWork to access the Application scope object or page scope of SimpleQuantity (to be cleaner and maintain good encapsulation)? There should be a clean ways for a JSP to “expose” just the vars intended to be used from other apps.
3. Is there a way for SimpleQuantity to "signal" DoWork when its done? (e.g. send an interrupt to wake up a
thread for example?)
Thanks in advance for any advice. :roll:
john
Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA