From: Lane S. <la...@op...> - 2004-10-01 16:49:07
|
cgi impersonator is not a mainline class and could be deprecated to support this initiative. -Lane Hai-Chen Tu wrote: > Sebastian, > I searched all the ContextTools code and found that > CGI_Impersonator is the only class that needs to > access ServletContext and it also assumes that > the broker is a ServletBroker (see code below). > > CGI_Impersonator(WebContext wc) { > requst_ = wc.getRequest(); > // this is not very nice, but I don't see any other > // possibility to get the servlet context. We should > // provide a method in WebContext to hide this from our > users. > sc_ = ((ServletBroker) > wc.getBroker()).getServletContext(); > } > > Without this problem, I think we can use a regular WM (i.e., not > initialized with a ServletBroker) as the base for WebMacro engine > in Spring. > And we can use WebContext inside WebMacroView for servlet > application and > regular Context for other usages (e.g., email templates). > > Also, I think the main reasons for having > Servlet20Broker/Servlet22Broker are > to add few more places for locating property files, templates, and > other > resources and to use ServletContext.log(...) for logging purpose. > They probably > should be replaced by Spring-friendly ones, e.g., like the way > your have > implemented. > > So the question now is how to address the CGI issue. Comments? > Hai-Chen Tu > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |