Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » How to listen to "Add and remove projects" to server event?
How to listen to "Add and remove projects" to server event? [message #524616] Thu, 01 April 2010 11:41 Go to next message
Eclipse UserFriend
Hi,

I'd like to monitor when a web project is added to a server using WTP's API.
I think I need to register some sort of listener for "add and remove projects" event (and run as ... server).
Then once a project is added to a server, I'll need to get its deployment path, so I can ultimately create/update some appropriate LaunchConfiguration.
Can anyone give me some pointers to the right classes / extension points/ patterns allowing me to achieve this?

Thanks in advance.

regards,

Fred Bricon


Re: How to listen to "Add and remove projects" to server event? [message #527913 is a reply to message #524616] Fri, 16 April 2010 17:46 Go to previous message
Eclipse UserFriend
There will be a server change event issued when the modify modules are called during add/remove project. Therefore, you can use:
org.eclipse.wst.server.core.IServer.addServerListener(IServe rListener, int)

And pass in org.eclipse.wst.server.core.ServerEvent.SERVER_CHANGE
as the even mask on the second parameter.

Notice that you'll get notified when whenever the module changes. Therefore, you can figure out the change in module list by using IServer.getModules() to find out the existing list of modules after the change.

Elson
Previous Topic:Tomcat timeout - but started correctly
Next Topic:Javascript validation and jar files
Goto Forum:
  


Current Time: Tue Jul 22 19:33:10 EDT 2025

Powered by FUDForum. Page generated in 0.03781 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top