Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat - Multiple Root Context(Debugging two tomcat projects in the root context in different HOST)
Tomcat - Multiple Root Context [message #890325] Fri, 22 June 2012 00:24 Go to next message
Miguel Perez is currently offline Miguel PerezFriend
Messages: 2
Registered: June 2012
Junior Member
Hello,

I'm a newbie to Eclipe Indigo. I've have two major dynamic web projects which both need to sit in the root context. I tried editing the server.xml file to place each root context into seperate HOST tags eg. localhost and localhost1.

But when I debug or run each project Eclipse doesn't copy the project to the right place in Tomcat. Please help me configure the two project properly.

Thanks in advance.
Miguel

[Updated on: Fri, 22 June 2012 00:24]

Report message to a moderator

Re: Tomcat - Multiple Root Context [message #890514 is a reply to message #890325] Fri, 22 June 2012 13:23 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 6/21/2012 8:24 PM, Miguel Perez wrote:
> Hello,
> I'm a newbie to Eclipe Indigo. I've have two major dynamic web projects
> which both need to sit in the root context. I tried editing the
> server.xml file to place each root context into seperate HOST tags eg.
> localhost and localhost1.
>
> But when I debug or run each project Eclipse doesn't copy the project to
> the right place in Tomcat. Please help me configure the two project
> properly.
>
> Thanks in advance.
> Miguel

See the Tomcat FAQ[1] for info about the Tomcat support in WTP. I
believe the Tomcat support will only use the first <Host> tag in
server.xml and ignore any others. There may be side effects from trying
move one of the contexts to a different <Host> tag. If it's not in the
first host, I don't think it will get published. You may have to add
both projects to the Tomcat server, one as ROOT and the other as
something else. Then manually create a context in the second <Host> tag
that serves the same thing as the non-ROOT context, but as ROOT. This
context gets served twice by different hosts, but having in the first
host ensures it will get published properly and having it in the second
host allows it to be served as a ROOT context.

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ
Re: Tomcat - Multiple Root Context [message #892723 is a reply to message #890514] Fri, 29 June 2012 11:23 Go to previous message
Miguel Perez is currently offline Miguel PerezFriend
Messages: 2
Registered: June 2012
Junior Member
Thanks for the tips Larry. Your comments and the link was very useful, it allowed me to get some understanding on how the system works. I now have two configuration instances of tomcat, one for each project.

I hope in the future the development plan for WTP Tomcat is for Eclipse to understand multiple <Host> tags. My clients are always keen to have the products on the root of the domain, so I never use context folders.

Best regards,
Miguel
Previous Topic:use custom xsd with the StructuredTextEditor
Next Topic:ECMAScript Compliance Level 3 -> 5?
Goto Forum:
  


Current Time: Fri Apr 26 09:13:23 GMT 2024

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

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

Back to the top