Home » Language IDEs » ServerTools (WTP) » Adding a facet support for tomcat
Adding a facet support for tomcat [message #222542] |
Wed, 01 October 2008 14:52 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #222547 is a reply to message #222546] |
Wed, 01 October 2008 18:00 |
Eclipse User |
|
|
|
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 |
Larry Isaacs Messages: 1354 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 |
Larry Isaacs Messages: 1354 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
|
|
|
Goto Forum:
Current Time: Wed Sep 25 19:00:34 GMT 2024
Powered by FUDForum. Page generated in 0.03011 seconds
|