Permalink
Browse files

JCR-3250: webapp welcome page shows incorrect port when port is the d…

…efault port

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1297526 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent e663da9 commit e947eb043c840c6a4b85a77c0134f690d573a35b @reschke reschke committed Mar 6, 2012
@@ -19,8 +19,9 @@
request.setAttribute("title", "JCR Remoting Server");
URI uri = new URI(request.getRequestURL().toString());
+int port = uri.getPort();
String href =
- uri.getScheme() + "://" + uri.getHost() + ":" + uri.getPort()
+ uri.getScheme() + "://" + uri.getHost() + (port == -1 ? "" : (":" + port))
+ request.getContextPath()
+ JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext());
href = Text.encodeIllegalXMLCharacters(href);
@@ -21,8 +21,9 @@
request.setAttribute("title", "JCR Remoting Server with Batch Read/Write");
URI uri = new URI(request.getRequestURL().toString());
+int port = uri.getPort();
String href =
- uri.getScheme() + "://" + uri.getHost() + ":" + uri.getPort()
+ uri.getScheme() + "://" + uri.getHost() + (port == -1 ? "" : (":" + port))
+ request.getContextPath()
+ JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext());
href = Text.encodeIllegalXMLCharacters(href);
@@ -19,8 +19,9 @@
request.setAttribute("title", "Standard WebDAV Server");
URI uri = new URI(request.getRequestURL().toString());
+int port = uri.getPort();
String href =
- uri.getScheme() + "://" + uri.getHost() + ":" + uri.getPort()
+ uri.getScheme() + "://" + uri.getHost() + (port == -1 ? "" : (":" + port))
+ request.getContextPath()
+ SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext())
+ "/default/";

0 comments on commit e947eb0

Please sign in to comment.