Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » API-only way to create dynamic web project using facets
API-only way to create dynamic web project using facets [message #186294] Tue, 16 January 2007 16:22 Go to next message
Raphael Mueller is currently offline Raphael MuellerFriend
Messages: 1
Registered: July 2009
Junior Member
Hi there,

first of all: I found a nice tutorial at: s/tutorial.html
Now I know how to crate a dynamic web project by extending
org.eclipse.wst.common.project.facet.core.facets, contribute wizard pages to
it .... and so on.

BUT: Is there also an API-only way (I don't need a wizard) to create a
dynamic web project configured by facets (like "" , "jst.web" ....)?
So what I want to do per API is:
create dynamic webproject
set/enable facets on it (java, web, jsf)
create WAR file containing the dynamic webproject
create an EAR file and add WAR to it

Can anyone outline how to do this using WTP 1.5

Thanks in advance.
Re: API-only way to create dynamic web project using facets [message #186423 is a reply to message #186294] Wed, 17 January 2007 18:26 Go to previous message
Eclipse UserFriend
Originally posted by:


To create a blank faceted project, you can use one of the
ProjectFacetsManager.create() methods.

Once the project is created you will need to set fixed facets (those
facets that the user cannot deselect (WTP sets and jst.web for
the Dynamic Web Project as fixed) and set the runtime. You can do this
using setFixedProjectFacets() and addTargetedRuntime() methods of

The next step is to install facets. You can do that using the modify
method of IFacetedProject or the convenience method installProjectFacet.

Now your project is created and configured.

To export ear archives, take a look at
org.eclipse.jst.j2ee.application.internal.operations.EARComp onentExportDataModelProvider
class. You can use it to create an IDataModel object that is used to
parameterize the export operation and then use getDefaultOperation()
method on IDataModel to get an executable operation that will create the

This should be enough to get you started.

- Konstantin
Previous Topic:can't access tomcat manager application when starting tomcat internally
Next Topic:show generated html of a jsp
Goto Forum:

Current Time: Fri Apr 16 10:48:44 GMT 2021

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

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

Back to the top