This content has been marked as final.
Show 1 reply
-
1. Re: wrong context path when WAR file name starts with number(s)
jaikiran Jan 21, 2010 5:24 AM (in response to sweber2010)sweber2010 wrote:
Hello,
I have a problem with deployment of a WAR file which has a file name starting with a number, e.g. "5live.war". When the file is deployed the context path of the application is the file name without the numbers at the beginning, "live" in the example. This happens with JBoss AS 4.2.2.GA and JBoss 4.2.3.GA.
I can see this happening even with the latest AS versions and the AS trunk. There's this specific code http://anonsvn.jboss.org/repos/jbossas/trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java with comments which does this:
// Strip any '<int-value>.' prefix int index = 0; for (; index < webContext.length(); index++) { char c = webContext.charAt(index); if (Character.isDigit(c) == false && c != '.') break; } webContext = webContext.substring(index);
Based on those comments, it looks intentional. Although I don't know of a reason why the context name should not start with a digit.