Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] JSP and pointcuts

Depends if you have control over the web service codebase - if you do then it's like any other app and can be advised at compile and weave time. You can advise a JSP by precompiling it into a servlet, you can advise a web service if you have the codebase - all using AspectJ BUT - nope you cannot advise a web service if it is something you are just using and is not under your control , and admittedly it does look from the original question that the web service is just being 'used' rather than part of the controlled development environment (however you can advise the calls to the web service as they are located in your JSP in which you should have control of the source).

It's just a case of 'do you have control of the codebase for the JSP and/or web service?' and 'where exactly you want the advice to take shape?'. If you are just using the web service, then you can advise your servlet but not the web service itself.

Cheers,

Russ

On 30 Nov 2004, at 08:23, Arto Pastinen wrote:

Hi!

You can't. JSP and web services are managed different containers. That
web service can be even different JVM other side on world, so you don't
have reference to web service in JSP.

Artsi

On Tue, 2004-11-30 at 10:12, Russell Miles wrote:
Not sure I completely understand, are you advising the JSP or the web
service (in other words, are you weaving into the codebase of the JSP
by advising when the web service is called or is the intent to weave
into the web service's codebase itself)?

Either way, it's definitely possible to use AspectJ when advising JSP's
(tricky and a bit manual at the moment but possible) and/or web
services (in Axis anyway as it's Java)

Cheers,

Russ

On 30 Nov 2004, at 06:36, Eric Bodden wrote:


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ujuarez71@xxxxxxxxxxxx wrote:
Hi.

I have a JSP file where I invoke a web service in this file. How I
can stablish pointcuts in the JSP file in order to add certain
behaviour to the web services?
I am not sure, if at the moment any of the frameworks supports that.
And I am pretty much sure that AspectJ does not. However in the near
future that could e.g. be adresses by metadata annotations for JSP:
http://jcp.org/en/jsr/detail?id=181 So it would make a great entey on
the wishlist I guess.

Eric

- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQawU3swiFCm7RlWCEQIolgCeIDQX4397HX779pWuXsHmMFXy7k0AnRjC
0Kn2A9x8JVH5kTXSMAZvE7A6
=SVy8
-----END PGP SIGNATURE-----


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top