Discussion:
I had a problem please help me
(too old to reply)
v***@ndsu.edu
2007-05-01 02:29:18 UTC
Permalink
Hello Guyz,

I am working on WebGoat(web application) project as of my research work. I
am trying to write some aspects to improve the security of the Webgoat
aplication.

I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.

I did deploy the project as it was mentioned in the aspectJ cook book.

Please help me.
Thank you,
Vasumathi.
Charles Zhang
2007-05-01 17:59:29 UTC
Permalink
Do you have aspectjrt.jar on the classpath?

Yawn !!

----- Original Message ----
From: "***@ndsu.edu" <***@ndsu.edu>
To: aspectj-***@eclipse.org; aspectj-***@eclipse.org
Sent: Monday, April 30, 2007 10:29:18 PM
Subject: [aspectj-users] I had a problem please help me

Hello Guyz,

I am working on WebGoat(web application) project as of my research work. I
am trying to write some aspects to improve the security of the Webgoat
aplication.

I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.

I did deploy the project as it was mentioned in the aspectJ cook book.

Please help me.
Thank you,
Vasumathi.
v***@ndsu.edu
2007-05-02 13:55:39 UTC
Permalink
Yes I have

Vasumathi
Post by Charles Zhang
Do you have aspectjrt.jar on the classpath?
Yawn !!
----- Original Message ----
Sent: Monday, April 30, 2007 10:29:18 PM
Subject: [aspectj-users] I had a problem please help me
Hello Guyz,
I am working on WebGoat(web application) project as of my research work. I
am trying to write some aspects to improve the security of the Webgoat
aplication.
I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.
I did deploy the project as it was mentioned in the aspectJ cook book.
Please help me.
Thank you,
Vasumathi.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Ron DiFrango
2007-05-02 14:50:40 UTC
Permalink
I think your aspect needs to be marked as privileged access the protected method.

privileged aspect Hello { .... }

See the following:

http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html <http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html>

Ron DiFrango
Senior Consultant

________________________________

From: aspectj-users-***@eclipse.org on behalf of ***@ndsu.edu
Sent: Wed 5/2/2007 9:55 AM
To: aspectj-***@eclipse.org
Subject: Re: [aspectj-users] I had a problem please help me



Yes I have

Vasumathi
Post by Charles Zhang
Do you have aspectjrt.jar on the classpath?
Yawn !!
----- Original Message ----
Sent: Monday, April 30, 2007 10:29:18 PM
Subject: [aspectj-users] I had a problem please help me
Hello Guyz,
I am working on WebGoat(web application) project as of my research work. I
am trying to write some aspects to improve the security of the Webgoat
aplication.
I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.
I did deploy the project as it was mentioned in the aspectJ cook book.
Please help me.
Thank you,
Vasumathi.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
v***@ndsu.edu
2007-05-02 21:07:30 UTC
Permalink
Thanks Ron Bodkin and Ron DiFrango,

The application is working now. I am writing security aspects to WebGoat
open source application which is not secure.

I am planning to solve the security problems in the webgoat application
using aspectJ. Do you have any online meterial to read becuase i am new
and I don't have much knowledge on aspectJ.

Do you have any projects or code in which the problems solved using aspectJ.

Thank you,
Vasumathi.
Post by Ron DiFrango
I think your aspect needs to be marked as privileged access the protected method.
privileged aspect Hello { .... }
http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html
<http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html>
Ron DiFrango
Senior Consultant
________________________________
Sent: Wed 5/2/2007 9:55 AM
Subject: Re: [aspectj-users] I had a problem please help me
Yes I have
Vasumathi
Post by Charles Zhang
Do you have aspectjrt.jar on the classpath?
Yawn !!
----- Original Message ----
Sent: Monday, April 30, 2007 10:29:18 PM
Subject: [aspectj-users] I had a problem please help me
Hello Guyz,
I am working on WebGoat(web application) project as of my research work. I
am trying to write some aspects to improve the security of the Webgoat
aplication.
I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.
I did deploy the project as it was mentioned in the aspectJ cook book.
Please help me.
Thank you,
Vasumathi.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Bartlomiej Zdanowski AutoGuard Ltd.
2007-05-02 06:05:49 UTC
Permalink
Could you send us your Hello-aspect code? I'm not familiar with servlets
but with aspects I do. Could you send information about doPost()? It's
declaration - arguments, return type and package.
Post by v***@ndsu.edu
I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.
--
*Bartlomiej Zdanowski*
Programmer
Product Research & Development Department
AutoGuard & Insurance Ltd.

Omulewska 27 street
04-128 Warsaw
Poland
phone +48 22 611 69 23
www.autoguard.pl <http://www.autoguard.pl>
v***@ndsu.edu
2007-05-02 13:54:08 UTC
Permalink
Thank you,
I set the class path corect.

I am sending the code

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public aspect Hello {

protected pointcut sayHello(HttpServletRequest
request,HttpServletResponse response):
execution(protected void doGet(HttpServletRequest,
HttpServletResponse))&&args(request,response);

before(HttpServletRequest request,HttpServletResponse
response):sayHello(request,response){
System.out.println("Hello");
}

after(HttpServletRequest request,HttpServletResponse
response):sayHello(request,response){
System.out.println("Bye");
}

}


public class Controller extends HttpServlet

{

private static final long serialVersionUID = 1L;


protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException

{

doPost(request, response);

}


protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException

{

String userAgent = request.getHeader("user-agent");

String clientBrowser = "Not known!";

if (userAgent != null)

{

clientBrowser = userAgent;

}

request.setAttribute("client.browser", clientBrowser);

request.getRequestDispatcher("/view.jsp").forward(request, response);

}

}


Thanks,
Vasumathi
Post by Bartlomiej Zdanowski AutoGuard Ltd.
Could you send us your Hello-aspect code? I'm not familiar with servlets
but with aspects I do. Could you send information about doPost()? It's
declaration - arguments, return type and package.
Post by v***@ndsu.edu
I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.
--
*Bartlomiej Zdanowski*
Programmer
Product Research & Development Department
AutoGuard & Insurance Ltd.
Omulewska 27 street
04-128 Warsaw
Poland
phone +48 22 611 69 23
www.autoguard.pl <http://www.autoguard.pl>
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Ron Bodkin
2007-05-02 17:35:38 UTC
Permalink
Actually, a non-privileged aspect is allowed to advise non-public methods
and fields. It can't call or access them: for that you would need a
privileged aspect. We use non-privileged aspects that advise non-public
methods extensively in Glassbox.



Vasumathi, I'd be interested to know where you put the compiled aspect and
aspectjrt.jar for this application: is it in WEB-INF/lib? Are you using
compile-time or load-time weaving?



_____

From: aspectj-users-***@eclipse.org
[mailto:aspectj-users-***@eclipse.org] On Behalf Of Ron DiFrango
Sent: Wednesday, May 02, 2007 7:51 AM
To: aspectj-***@eclipse.org
Subject: RE: [aspectj-users] I had a problem please help me



I think your aspect needs to be marked as privileged access the protected
method.



privileged aspect Hello { .... }



See the following:




<http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.htm
l>
http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html



Ron DiFrango
Senior Consultant



_____

From: aspectj-users-***@eclipse.org on behalf of
***@ndsu.edu
Sent: Wed 5/2/2007 9:55 AM
To: aspectj-***@eclipse.org
Subject: Re: [aspectj-users] I had a problem please help me

Yes I have

Vasumathi
Post by Charles Zhang
Do you have aspectjrt.jar on the classpath?
Yawn !!
----- Original Message ----
Sent: Monday, April 30, 2007 10:29:18 PM
Subject: [aspectj-users] I had a problem please help me
Hello Guyz,
I am working on WebGoat(web application) project as of my research work. I
am trying to write some aspects to improve the security of the Webgoat
aplication.
I wrote a simple aspect to say hello when a servlets doPost() is called.
But I am AspectNotBoundException. I don't have any idea, why it is coming
and how can solve that.
I did deploy the project as it was mentioned in the aspectJ cook book.
Please help me.
Thank you,
Vasumathi.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Continue reading on narkive:
Loading...