Bug 53473 - Error in isVirtualWebappRelative param configuration
Error in isVirtualWebappRelative param configuration
Product: Tomcat 7
Classification: Unclassified
Component: Documentation
All All
: P2 minor (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2012-06-27 08:35 UTC by Giorgio Giudetti
Modified: 2012-06-28 06:03 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Giorgio Giudetti 2012-06-27 08:35:42 UTC
The docs for the 'isVirtualWebappRelative' param configuration state that '0' or '1' is the accepted setting:

web.xml and ssi-howto:
<!--   isVirtualWebappRelative                                            -->
<!--                       Should "virtual" paths be interpreted as       -->
<!--                       relative to the context root, instead of       -->
<!--                       the server root?  (0=false, 1=true) [0]        -->

but the code that reads the parameter is:

isVirtualWebappRelative = Boolean.parseBoolean(config.getInitParameter("isVirtualWebappRelative"));

isVirtualWebappRelative = Boolean.parseBoolean(getServletConfig().getInitParameter("isVirtualWebappRelative"));

As of that code, the only working configuration to set the 'isVirtualWebappRelative' to true is:


and not

Comment 1 Mark Thomas 2012-06-27 19:39:46 UTC
Thanks for the report. Fixed in trunk and 7.0.x and will be included in 7.0.29 onwards.
Comment 2 Konstantin Kolinko 2012-06-28 06:03:03 UTC
Fixed in 6.0 as well with r1354820 and will be in 6.0.36.

Note: int value for this option is used by Tomcat 5.5, so no fix there is needed
in SSIFilter, SSIServlet of 5.5.x:
isVirtualWebappRelative = Integer.parseInt(value) > 0?true:false;