Re: [Webwork-user] Classloader changes
Brought to you by:
baldree,
rickardoberg
From: Rickard <ri...@jb...> - 2000-12-18 07:38:33
|
Hi! "Maurice C . Parker" wrote: >=20 > Rickard, >=20 > The last actionLoader change in Dispatcher broke the Tomcat when runnin= g without jBoss. When I backed out the changes it works fine for me agai= n. Same problem with the Bean tag. When running Tomcat alone the Thread= .currentThread().getContextClassLoader() won't work for me but getClass()= .getClassLoader() will. >=20 > The log entry for the Dispatcher change is "Fixed classloader usage". = What was broken? The dispatcher servlet used the getClass().getClassLoader() to get the actions, which is a broken way to do it. If WebWork is installed in the servers classpath, but the actions are in a Web Application, then the actions are not loaded by the dispatcher servlet classloader, i.e. Class.forName("actionName") will always fail. This is the reason why one should use the CCL: library code, such as the WebWork dispatcher, can get the *context* in which they are being used, and access the actions that way.=20 If it doesn't work it's a Tomcat bug. I will investigate. I know this is fixable by adding an Jdk12Interceptor to the Tomcat conf, but I was hoping this was done as default by now. BTW, have you put WebWork in the application (WEB-INF/lib) or have you put it in Tomcats classpath? Adding it to the application should definitely work.=20 > BTW, the bean tag is cool. I really like the way it cleaned up the cod= e in the template controls. If we wanted to use the include directive in= stead of the webwork include tag, would it be best to enhance webwork.uti= l.Servlet to set parameters as well as get parameters? I have been thinking some about using include directive. It has some definitive drawbacks that aren't good re: parameter passing.... my thinking so far is that I don't want to use the include directive for the controls in WebWork, but that it can be mentioned in the docs as a possible change that people may do locally. BTW, since it is so common to access servlet parameters I am considering adding a specific tag for that. Going through the bean tag and property tag is somewhat inefficient for such a common task. Also, I'm working on some coarse grained controls right now that are REALLY cool: tab panes, menus, and card panes. It's beginning to look more and more like Swing this thing. /Rickard --=20 Rickard =D6berg Email: ri...@jb... |