This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
What are the rules for allowable values in the context-root element of application.xml? I typically use it the way I suspect 99% of developers use it - its just a single token that corresponds to the war name, e.g: <module> <web> <web-uri>myapp.war</web-uri> <context-root>myapp</context-root> </web> </module> and I'd get to the app features via something like: http://myserver:8080/myapp/... I've run into a deployment-time situation where I need to have the servlet context correspond to a path, such as: http://myserver:8080/foo/bar/myapp... I've been pounding my head against WebLogic 7 trying stuff like: <module> <web> <web-uri>myapp.war</web-uri> <context-root>foo/bar/myapp</context-root> </web> </module> and same as above, but with an initial "/": <module> <web> <web-uri>myapp.war</web-uri> <context-root>/foo/bar/myapp</context-root> </web> </module> I've yet to have any luck. Is this something that should work? In other words, am I doing something allowable but my web container doesn't correctly implement it, or am I doing something I should even be attempting?
In the end, this is probably something to take up with BEA support. The context-root in application.xml is part of the J2EE packaging, used to override the context-root in weblogic.xml (which is, of course, WLS specific), which is used to override simply using the uri minus the .war extension as the context-root.