Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] How to properly set {OrionHome} (WAR file issue)

I've been trying to get Maqetta/Orion working when running from a WAR file [1].  We've fixed most of the Maqetta issues and identified some Orion ones.

Now, I'm running into an issue where the Orion client doesn't work, due to the "OrionHome" variable.  As part of https://bugs.eclipse.org/bugs/show_bug.cgi?id=373450, it was set to the hostname of the loaded URL.  The problem is that when running from a WAR file, all URLs contain a base "context", corresponding to the name of the WAR file.  In our case, with a release named "maqetta.war", all URLs look like http(s)://[hostname]/maqetta/... -- but Orion fails because "OrionHome" is missing the "/maqetta" bit.

I think I should be good to go if I can just properly set OrionHome in the 3 or 4 places it is set; most of Orion client seems to make direct use of this variable.  The question is how to set OrionHome correctly?  Does Orion already have some core code that could be useful in this case?  Is there an easy way to determine from which base URL Orion is running?

I already have some code (a bit of a hack, really) on the server that can tell if Maqetta/Orion is running from a WAR.  But what's the best way to get that information from the server to the client code?  If someone could point me to the correct Orion classes, I could get this working...


[1] Eclipse bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=377823
    Maqetta bug: https://github.com/maqetta/maqetta/issues/19


Javier Pedemonte

Back to the top