cfmlprojects / runwar

Other
11 stars 16 forks source link

Runwar tries to start Railo/Lucee sites as a WAR even if they aren't due to WEB-INF #34

Closed bdw429s closed 8 years ago

bdw429s commented 8 years ago

https://ortussolutions.atlassian.net/browse/COMMANDBOX-398

We need to make Runwar a bit smarter at detecting when a site is a WAR. Pretty commonly, people try to use CommandBox/Runwar to start up a site previously used with a stock installation of Railo or Lucee, which has a WEB-INF folder in the web root. Since the site looks like a WAR, Runwar tries to treat it as one, but the WEB-INF has no jars/classes, or web.xml so it fails.

Exception in thread "main" java.lang.NullPointerException
at runwar.Server.getJarList(Server.java:767)
at runwar.Server.startServer(Server.java:287)

I can't fix this on the CommandBox side since Runwar is the one deciding if the web root is a WAR. What if we check for the existence of WEB-INF/web.xml first before treating it as a WAR? This would cause any left-over web-infs to essentially be ignored when starting a site via CommandBox. I could probably get CommandBox to actually use that WEB-INF/railo or WEB-INF/lucee as the web context home, but for now let's just prevent it from blowing up.

bdw429s commented 8 years ago

https://github.com/cfmlprojects/runwar/pull/35

bdw429s commented 8 years ago

Additional pull https://github.com/cfmlprojects/runwar/pull/36