Author: sdumitriu
Date: 2008-02-08 19:50:01 +0100 (Fri, 08 Feb 2008)
New Revision: 7415
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiServletURLFactory.java
Log:
XWIKI-2093: Improper names for the URL components in XWikiServletURLFactory
Add some javadoc, and a public method for obtaining the servlet path.
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiServletURLFactory.java
===================================================================
---
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiServletURLFactory.java
2008-02-08 18:45:32 UTC (rev 7414)
+++
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiServletURLFactory.java
2008-02-08 18:50:01 UTC (rev 7415)
@@ -97,11 +97,29 @@
}
}
+ /**
+ * Returns the part of the URL identifying the web application. In a
normal install, that is
+ * <tt>xwiki/</tt>.
+ *
+ * @return The configured context path.
+ */
public String getContextPath()
{
return contextPath;
}
+ /**
+ * Returns the part of the URL identifying the servlet inside the web
application, which is the
+ * Struts mapping name. In a normal install, that is <tt>bin/</tt>. Other
usual values are
+ * <tt>xwiki/</tt> and <tt>testbin/</tt>.
+ *
+ * @return The servlet path corresponding to the current request.
+ */
+ public String getServletPath()
+ {
+ return servletPath;
+ }
+
private URL getServerURL(XWikiContext context) throws MalformedURLException
{
return getServerURL(context.getDatabase(), context);
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications