If you want to represent that your "servletContextListener under its contextInitialized Method , it is creating a Thread Object . " you need a Sequence diagram, because
is there where methods are shown.
Ravi Kiran Pattu wrote:Thanks for the reply , but i am talking about Class Diagrams only . could you please tell me how to do this with Class Diagrams . Thanks .
You can't. In class diagrams you cannot represent calls between methods. If you only want to represent relationships between those objects, then, as you
said in your first post, you can use Servlet class and aggregation association.