Skip to main content

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

> > >> How I
> > >> can stablish pointcuts in the JSP file in order to add certain
> > >> behaviour to the web services?

You _can_ add behavior at the JSP call join points by using AspectJ
where you would use Java in the JSP file, and then compiling the JSP
file not with javac but with ajc.  There's documentaion in the 
sample code linked off the online AspectJ documentation page for
using ajc to compile JSP's.  The way to say this is "I'd like to 
advise calls to a web service from my JSP's."  (Pointcuts per
se only declare join points to advise.)

However, as Arto point out, this affects the behavior of calls to
the web service from your JSP, but not any execution join points
or static structure in the web service itself.  The way to say this
is "since the code for the web service is not under the control
of ajc (this implementation of AspectJ), ajc cannot implement
advice on join points or inter-type declarations in that code."

For more information, see the programming guide sections on the
call PCD and join point and on implementation.  You might also
look at the FAQ entry for J2EE, which describes limitations 
affecting possibly-remote calls and containers.

Wes

> ------------Original Message------------
> From: Arto Pastinen <arto.pastinen@xxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Tue, Nov-30-2004 0:26 AM
> Subject: Re: [aspectj-users] JSP and pointcuts
>
> 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