Posts

Showing posts from April, 2013

Add around advice to servlet in GAE using AspectJ

Image
Today, we will discuss about how to incorporate AspectJ in Google App Engine project. The AspectJ advices will be shown with example code. 1. First of all, download and install Google App Engine plugin for Eclipse. I am using eclipse juno . 2. Install AspectJ package (AJDT-AspectJ Development toolkit) in eclipse using this link . 3. Now, we have to add AspectJ support to Google App Engine. To add AspectJ support, a). Go to lib folder of project and copy-paste two aspectJ library files to it. Download latest aspectj-*.*.* from here . (As of now its aspectj-1.7.2.jar, I am using 1.7.1 version) Download latest aspectjrt.jar from here . Both file just copy paste in shown folder. Don't do it from outside of eclipse. Use eclipse IDE for copy paste. b). Now right click on project and go to configure and select > Convert to AspectJ project. c). Nowthere will be already one default class in GAE project. Sample code is given below.  package com....