Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] aspectJ + tomcat5

The compiler adapter required a dest dir to track its status.
The dest dir is the directory that classes are output to,
but Tomcat JSP compilation uses a Javac Ant task invocation
that does not specify the dest dir.

To support Tomcat, this requirement was removed after 1.1.1.
To get the fix, compile taskdefs module src (not testsrc) and
either put that jar in front on the classpath or remove/replace
the taskdefs in your aspectjtools.jar.  For convenience
I've attached the latest classes (since they're small).

Fair warning: I haven't tested this approach.  Please let us
know how it works out.

Wes

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/faq.html#q:buildingsource

Pfundstein, Patrick wrote:
Hi!
I am trying to have aspectJ working with tomcat5 in order to use an
aspect in a bean used in a JSP.
I have carefully followed the instructions at: http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/sam
ple-code.html#j2ee-tomcat4-jsp
but when accessing the jsp, I am having the following error in tomcat's
5 log:
INFO: Server startup in 12619 ms
(compiler.Compiler                   394 ) Javac exception
require destDir for getting tag file directory
        at
org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter.getDestDir(Ajc11Comp
ilerAdapter.java:110)
        at
org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter.getTagFile(Ajc11Comp
ilerAdapter.java:116)
        at
org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter.doneRecursing(Ajc11C
ompilerAdapter.java:157)
        at
org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter.execute(Ajc11Compile
rAdapter.java:86)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
        at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:390)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
...
So how do you set up this destDir? For some personal reasons, I would like to avoid to precompile the web
application and would therefore like to stick with 'traditional' ie non
compiled site.
Versions: tomcat5.016
aspectJ1.1.1
java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

Thanks! Patrick

Attachment: aspectj-head-taskdefs.zip
Description: Zip compressed data


Back to the top