Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ applied to JSP files on Tomcat6

Hi ,

I remember that I used the ANT task to pre-compile the JSP's first.
The jasper compiler can do that.

<jasper2
validateXml="false"
uriroot="${webapp.path}"
webXmlFragment="${webapp.path}/WEB-INF/generated_web.xml"
outputDir="${webapp.src.dir}" />

Once you do this you get 'generated_web.xml' and the source code of
the servlet. The servlet section from the generated_web.xml can be
included in the web.xml because that is the generate servlet.

So writing as aspect after you get the source code is straightforward.

Thanks,
Mohan

On Sun, May 2, 2010 at 4:27 AM, Alexander Lehmann <alexlehm@xxxxxxxxx> wrote:
> I am trying to apply AspectJ to JSP files running in Tomcat. When I do that
> with a servlet (e.g. with a simple logging aspect), it works, however I try
> to apply the same to a JSP, no aspects is called.
>
> Since the jsp files get compiled to Java file in the package org.apache.jsp,
> I figured that I should apply the aspect to org.apache.jsp.*, but nothing
> happens.
>
> I didn't find a current explanation how to use AspectJ with Tomcat6, all
> articles seem to be about either older versions of Tomcat or about Servlets
> but not JSPs.
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top