|RE: [wtp-dev] Access error overwriting web.xml|
You can also use the interface IModelProvider provided by ModelProviderManager to obtain a model object representing web.xml. The returned model object is an EMF object so modifying it is quite easy. Using the IModelProvider you will be able to get model objects for both web 2.4 and web 2.5 projects.
ps:It is also a good idea to wrap modifications in IDataModelOperation so that others can easily reuse them.
From: wtp-dev-bounces@xxxxxxxxxxx [mailto:wtp-dev-bounces@xxxxxxxxxxx] On Behalf Of Konstantin Komissarchik
Sent: Tuesday, 22. July 2008 19:15
To: General discussion of project-wide or architectural issues.
Subject: RE: [wtp-dev] Access error overwriting web.xml
This question would be more appropriate on the WTP newsgroup (http://www.eclipse.org/newsportal/thread.php?group=eclipse.webtools). Please post any follow-on questions there.
The best way to modify web.xml is to use the API provided by WTP such as WebArtifactEdit. That way your facet will co-exist peacefully with facets written by other people. If you must replace the file with canned contents, make sure that you are using Eclipse IO (rather than Java IO)... use IFile.setContents().
From: wtp-dev-bounces@xxxxxxxxxxx [mailto:wtp-dev-bounces@xxxxxxxxxxx] On Behalf Of Mike Murphy
Sent: Tuesday, July 22, 2008 7:24 AM
Subject: [wtp-dev] Access error overwriting web.xml
Hi all --
I am working on a project facet plugin (thanks to Konstantin!) that creates a default template project with a bunch of assets in place. Part of what we need to do is overlay the deployment descriptor with our own stock copy. I am finding that a file copy does not work, I get a strange "(Access Denied)" IOException. Is this because it is in the WEB-INF area? I also tried creating a IO file over the default one, and calling delete() on it, which seems to have no effect?
Am I missing some obvious Java IO thing here, or is this something WTP specific about WEB-INF?
Stay in touch when you're away with Windows Live Messenger. IM anytime you're online.
Back to the top