Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Adding a facet support for tomcat
Adding a facet support for tomcat [message #222542] Wed, 01 October 2008 14:52 Go to next message
Eclipse UserFriend
Originally posted by: imeikas.gmail.com

Hi

Is there a way to extend Tomcat (without creating a fragmented project and
override default behaviours) so that it would accept other facets than
"jst.web" (Dynamic Web Module)?
Problem is that I'd like to create a project that would be deployed under
Tomcat, but use my own project structure. Currently only way I know to add
projects under Tomcat is by adding facets "Dynamic Web Module" and "Java"
what force us to use unacceptable project configuration.

Ivar Meikas
Re: Adding a facet support for tomcat [message #222544 is a reply to message #222542] Wed, 01 October 2008 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: imeikas.gmail.com

Ivar Meikas wrote:

> Hi

> Is there a way to extend Tomcat (without creating a fragmented project and
> override default behaviours) so that it would accept other facets than
> "jst.web" (Dynamic Web Module)?
> Problem is that I'd like to create a project that would be deployed under
> Tomcat, but use my own project structure. Currently only way I know to add
> projects under Tomcat is by adding facets "Dynamic Web Module" and "Java"
> what force us to use unacceptable project configuration.

Forgot to mention, we use WTP 2.

Ivar Meikas
Re: Adding a facet support for tomcat [message #222546 is a reply to message #222544] Wed, 01 October 2008 16:58 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Ivar Meikas wrote:
> Ivar Meikas wrote:
>
>> Hi
>
>> Is there a way to extend Tomcat (without creating a fragmented project
>> and override default behaviours) so that it would accept other facets
>> than "jst.web" (Dynamic Web Module)?
>> Problem is that I'd like to create a project that would be deployed
>> under Tomcat, but use my own project structure. Currently only way I
>> know to add projects under Tomcat is by adding facets "Dynamic Web
>> Module" and "Java" what force us to use unacceptable project
>> configuration.
>
> Forgot to mention, we use WTP 2.
>
> Ivar Meikas
>

I believe getting your own facet to be accepted by a WTP Tomcat server
would be easy. See the
"org.eclipse.wst.common.project.facet.core.runtimes" extension in the
plugin.xml of the org.eclipse.jst.server.tomcat.core plug-in for
details/hints.

The bigger question is whether how will WTP treat a "dynamic web"
project that doesn't have a "jst.web" facet and whether you will lose
functionality you would want to keep. For example, I don't think File
-> Export -> WAR file would work with such a project. Not knowing what
you want different, it's hard to say if you could keep the "jst.web"
facet and still accomplish the changes you want.

Cheers,
Larry
Re: Adding a facet support for tomcat [message #222547 is a reply to message #222546] Wed, 01 October 2008 18:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: imeikas.gmail.com

Larry Isaacs wrote:

> I believe getting your own facet to be accepted by a WTP Tomcat server
> would be easy. See the
> "org.eclipse.wst.common.project.facet.core.runtimes" extension in the
> plugin.xml of the org.eclipse.jst.server.tomcat.core plug-in for
> details/hints.

> The bigger question is whether how will WTP treat a "dynamic web"
> project that doesn't have a "jst.web" facet and whether you will lose
> functionality you would want to keep. For example, I don't think File
> -> Export -> WAR file would work with such a project. Not knowing what
> you want different, it's hard to say if you could keep the "jst.web"
> facet and still accomplish the changes you want.

Hi,

What I have is
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<facet id="myfacet" version="1.0"/>
<runtime-component id="org.eclipse.jst.server.tomcat"
version="[5.0"/>
</supported>
</extension>

and

IModuleType[] moduleTypes =
server.getServerType().getRuntimeType().getModuleTypes();

still contain
[ModuleType[jst.web, 2.2], ModuleType[jst.web, 2.3], ModuleType[jst.web,
2.4], ModuleType[jst.utility, 1.0]] and nothing about myfacet.

this code is also used in ModuleSloshAction that checks if I can add the
project to the server.

Thanks in advance,
Ivar
Re: Adding a facet support for tomcat [message #222548 is a reply to message #222547] Wed, 01 October 2008 18:37 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Ivar Meikas wrote:
> Larry Isaacs wrote:
>
>> I believe getting your own facet to be accepted by a WTP Tomcat server
>> would be easy. See the
>> "org.eclipse.wst.common.project.facet.core.runtimes" extension in the
>> plugin.xml of the org.eclipse.jst.server.tomcat.core plug-in for
>> details/hints.
>
>> The bigger question is whether how will WTP treat a "dynamic web"
>> project that doesn't have a "jst.web" facet and whether you will lose
>> functionality you would want to keep. For example, I don't think File
>> -> Export -> WAR file would work with such a project. Not knowing
>> what you want different, it's hard to say if you could keep the
>> "jst.web" facet and still accomplish the changes you want.
>
> Hi,
>
> What I have is
> <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
> <supported>
> <facet id="myfacet" version="1.0"/>
> <runtime-component id="org.eclipse.jst.server.tomcat"
> version="[5.0"/>
> </supported>
> </extension>
> and
> IModuleType[] moduleTypes =
> server.getServerType().getRuntimeType().getModuleTypes();
>
> still contain [ModuleType[jst.web, 2.2], ModuleType[jst.web, 2.3],
> ModuleType[jst.web, 2.4], ModuleType[jst.utility, 1.0]] and nothing
> about myfacet.
>
> this code is also used in ModuleSloshAction that checks if I can add the
> project to the server.
>
> Thanks in advance,
> Ivar
>

OK, even Tomcat is looking specifically for "jst.web" to identify
modules it can deploy directly, see TomcatServer.canModifyModules().
Modifying this code would get you a little further, but depending on the
differences in your altered project structure, this may be the first of
many changes that will be needed.

Cheers,
Larry
Re: Adding a facet support for tomcat [message #222549 is a reply to message #222548] Wed, 01 October 2008 18:56 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Larry Isaacs wrote:
> Ivar Meikas wrote:
>> Larry Isaacs wrote:
>>
>>> I believe getting your own facet to be accepted by a WTP Tomcat
>>> server would be easy. See the
>>> "org.eclipse.wst.common.project.facet.core.runtimes" extension in the
>>> plugin.xml of the org.eclipse.jst.server.tomcat.core plug-in for
>>> details/hints.
>>
>>> The bigger question is whether how will WTP treat a "dynamic web"
>>> project that doesn't have a "jst.web" facet and whether you will lose
>>> functionality you would want to keep. For example, I don't think
>>> File -> Export -> WAR file would work with such a project. Not
>>> knowing what you want different, it's hard to say if you could keep
>>> the "jst.web" facet and still accomplish the changes you want.
>>
>> Hi,
>>
>> What I have is
>> <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
>> <supported>
>> <facet id="myfacet" version="1.0"/>
>> <runtime-component id="org.eclipse.jst.server.tomcat"
>> version="[5.0"/>
>> </supported>
>> </extension>
>> and
>> IModuleType[] moduleTypes =
>> server.getServerType().getRuntimeType().getModuleTypes();
>>
>> still contain [ModuleType[jst.web, 2.2], ModuleType[jst.web, 2.3],
>> ModuleType[jst.web, 2.4], ModuleType[jst.utility, 1.0]] and nothing
>> about myfacet.
>>
>> this code is also used in ModuleSloshAction that checks if I can add
>> the project to the server.
>>
>> Thanks in advance,
>> Ivar
>>
>
> OK, even Tomcat is looking specifically for "jst.web" to identify
> modules it can deploy directly, see TomcatServer.canModifyModules().
> Modifying this code would get you a little further, but depending on the
> differences in your altered project structure, this may be the first of
> many changes that will be needed.
>
> Cheers,
> Larry

Actually this "jst.web" refers to a ModuleType. Unfortunately, I'm not
sure, off the top of my head, what it would take to get your facet to
qualify as defining "jst.web" ModuleType.

Larry
Previous Topic:incubator 1.0M2 (and M1) build?
Next Topic:Synchronous Publish to generic servers?
Goto Forum:
  


Current Time: Sun Dec 21 06:10:35 GMT 2014

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

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