Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat 8 deploy to root context not working
Tomcat 8 deploy to root context not working [message #1705623] Mon, 17 August 2015 21:21 Go to next message
Jim Garrison is currently offline Jim GarrisonFriend
Messages: 9
Registered: July 2009
Junior Member
I am trying to test a simple webapp that will eventually be deployed to the root context on a Tomcat instance.

In Eclipse I open the server configuration page and under the Modules tab I set the Path to the empty string.

index.php/fa/22946/0/

However when running the webapp from within Eclipse, the "gallery" prefix is still required for requests to be routed to the application.

${tomcat.home}/conf/Catalina/localhost/ROOT.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="D:\dev\tools\apache-tomcat-8.0.24\wtpwebapps\gallery" 
         path="" 
         reloadable="true" 
         source="org.eclipse.jst.j2ee.server:gallery"/>


I have also configured the Web Project Settings context path:

index.php/fa/22947/0/

Everything seems to be configured to serve the application from the root context, and yet it still requires an extra /gallery prefix in every URL path.

What is the correct way to deploy to the root context? Is this possible from Eclipse?
  • Attachment: eclipse02.png
    (Size: 46.54KB, Downloaded 1645 times)
  • Attachment: eclipse01.png
    (Size: 24.40KB, Downloaded 1632 times)

[Updated on: Mon, 17 August 2015 21:41]

Report message to a moderator

Re: Tomcat 8 deploy to root context not working [message #1705705 is a reply to message #1705623] Tue, 18 August 2015 12:55 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 8/17/2015 5:21 PM, Jim Garrison wrote:
> I am trying to test a simple webapp that will eventually be deployed to the root context on a Tomcat instance.
>
> In Eclipse I open the server configuration page and under the Modules tab I set the Path to the empty string.
>
>
>
> However when running the webapp from within Eclipse, the "gallery" prefix is still required for requests to be routed to the application.
>
> ${tomcat.home}/conf/Catalina/localhost/ROOT.xml looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Context docBase="D:\dev\tools\apache-tomcat-8.0.24\wtpwebapps\gallery"
> path=""
> reloadable="true"
> source="org.eclipse.jst.j2ee.server:gallery"/>
>
> What is the correct way to deploy to the root context? Is this possible from Eclipse?
>

Open the Properties dialog for the "gallery" project and go to the "Web
Project Settings" page. For "Content root", you can't leave it blank,
but you can enter "/" and Tomcat should serve the project as the "ROOT"
webapp.

Cheers,
Larry
Previous Topic:WPE : Drop location is not properly identified
Next Topic:Javascript Editor Very Slow
Goto Forum:
  


Current Time: Fri Nov 16 19:50:04 GMT 2018

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

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

Back to the top