Re: [Actionframework-users] bug in VelocityInOutVariable for multiple servlets
Status: Inactive
Brought to you by:
ptoman
From: Mark D. A. <md...@di...> - 2002-09-16 07:49:36
|
> What is your Velocity.properties configuration? There are multiple servlets > in as_examples.war and they all (should ;-)) work when deployed. When i said "multiple servlets" i should have said "multiple web applications". The actionframework examples war puts all the servlets into a single web application. That means there is just a single url mapping, and so the bug i mentioned doesn't happen. However, if you have multiple web apps, things go wrong. In fact, the way that I found this problem was by trying to reorganize the actionframework examples in a way that will work treating each example as its own web application with its own web.xml file. Currently there are about 3 copies of all the examples, and still it doesn't work out of the box with a standard J2EE container, so far as i can see. In my rearranged version, i have an "examples-src/" directory that: - just has the sources - is not run from - has webmacro syntax Then there is a derived tree under build/webapps that: - will generated vm for velocity or wm for webmacro according to what is asked - will optionally generate all the servletrunner cruft, but not unless asked - will work out of the box with a J2EE standard servlet container It looks like this: build/ webapps/ Calculator/ WEB-INF/ web.xml classes/ Calculator.class vm/ Calculator.vm error.vm config/ Calculator.xml Velocity.properties Calculators/ ... servlet containers such as jetty will run everything under a webapps/ directory automatically. although currently i'm running into various problems with actionframework, such as that class static variable. also, without my patch for getRealPath, it is awkward when an application uses ActionServlet directly without subclassing (because WEB-INF/classes won't be in its classpath because its instance doesn't have that for its classloader). -mda |