"Craig R. McClanahan" wrote:
This would not be my choice -- IMHO JSPs should be used for (V)iew and servlets
for (C)ontroller -- but you can make it work.
I agree. But given the constraints I'm working with here, I see this as a quick first step!
If the models can be represented by beans that are stored as session or request
attributes, this should be pretty easy.  Such beans can be readily shared between
JSPs and servlets by putting them in the appropriate scope (request, session, or
servlet context).
This is exactly what I do - use my models as beans in request scope - and I'm quite pleased with the ease of reuse of old code using this metaphor!
You should look at storing things like connection pools and other service objects
as attributes of the servlet context, rather than using singletons.
Since my legacy models use the singletons extensively, I'm trying hard to resue them for the upcoming release. In the future I hope to be transitioning into EJB and will revisit this whole area of system services.
It may also be necessary to load the
classes for these types of service objects from the system class path instead of
the application class path, but the details here are very specific to each server
environment.
You make an interesting observation. I checked the online docs for WebLogic and I did see some minimal writeup on System and App class paths vis-a-vis JSP. I need to understand this a little better. Thanks for pointing it out!

Girish Haran
Member of Tech Staff
Bidder's Edge Inc.
 

Reply via email to