Jump to content

[Solved] How to set the context path of my war to "/".


rakesh73

Recommended Posts

You can't. WAR files cannot be assigned as the default page for a domain.

 

You'll instead need to create an index file or other redirect and point users to the virtual folder where the WAR file is deployed. Place that file in the document root so when users visit http://beepr.heliohost.org/ they're redirected to your WAR file. Any redirect script would work, for instance an HTML file with a Javascript on it, an .htaccess file, or a PHP script with a header("Location: ..."); would all work fine for this.

Link to comment
Share on other sites

It's to do with the fact that the Tomcat installation is shared between numerous users on our servers.

 

I'll pass this onto Krydos to be sure, but I've never known of this being done on our system. WARs typically have to be inside a folder prefixed with the account username.

Link to comment
Share on other sites

I want my complete app to be deployed in a war package. I do not want to put anything in the document root for now.

Tomcat supports multiple domains/applications through configurations in server.xml
For my local application I could configure the context path as below. Can something similar be done on my domain.

 

<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true" deployOnStartup="false">

<Context path="" docBase="Beepr-0.0.1-SNAPSHOT"></Context>
        ........
        ........

</Host>

 

 

Thanks

Link to comment
Share on other sites

Hi everyone :lol: ,
I'll face the same problem...
I just created my account, migrate to Tommy, Installed Tomcat and ... to upload my project and make it work properly I'll need an access to server.xml : the root of our site, the SSL conf, jdbc driver for ourconnection pool... (the connexion pool is better perf for your Tomcat server).

I can see i'm not the only one asking for it, we need an indirect access to our virtual host inside the server.xml at least.
An idea : a form in the cpanel to edit our virtual host conf. Your server will receive the request, find out virtual host with our account informations, modify the xml with the form values afterward.

Just a simple send xml text to add xml lines, the server will put them in our virtual host.

Or put a file via FTP that'll configure the virtual host...

 

You may waste some time to build it but once it'll be in our cPanel : "Automatic process" = You can do anything else.
 

 

(If you don't have the time I may dev this fonctionality for you if you tell me what server side language will edit the xml)

 

The web.xml is in the .war for the url paths as I can see... And we can run .js images sounds json models normally ?

Thank you ^_^

Edited by claod
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...