提交 51ff5a42 编写于 作者: K kohsuke

getting context path from HttpServletRequest is better as the method has been...

getting context path from HttpServletRequest is better as the method has been available for a long time.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3797 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a712248e
......@@ -127,7 +127,7 @@ public abstract class AbstractItem extends Actionable implements Item {
String seed = Functions.getNearestAncestorUrl(req,this);
if(seed!=null) {
// trim off the context path portion and leading '/', but add trailing '/'
return seed.substring(req.getServletContext().getContextPath().length()+1)+'/';
return seed.substring(req.getContextPath().length()+1)+'/';
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册