[Yanel-commits] rev 24330 -
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet
michi at wyona.com
michi at wyona.com
Thu May 10 15:03:09 CEST 2007
Author: michi
Date: 2007-05-10 15:03:07 +0200 (Thu, 10 May 2007)
New Revision: 24330
Modified:
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
Log:
back 2 realm fixed and get global data fixed
Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java 2007-05-10 12:48:32 UTC (rev 24329)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java 2007-05-10 13:03:07 UTC (rev 24330)
@@ -174,6 +174,14 @@
// Check authorization
if(doAuthorize(request, response) != null) return;
+ // Check for requests for global data
+ Resource resource = getResource(request, response);
+ String path = resource.getPath();
+ if (path.indexOf("/" + reservedPrefix + "/") == 0) {
+ getGlobalData(request, response);
+ return;
+ }
+
// Delegate ...
String method = request.getMethod();
if (method.equals(METHOD_PROPFIND)) {
@@ -199,14 +207,7 @@
*/
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession(true);
-
- // Check for requests for global data
Resource resource = getResource(request, response);
- String path = resource.getPath();
- if (path.indexOf("/" + reservedPrefix + "/") == 0) {
- getGlobalData(request, response);
- return;
- }
// Check for toolbar ...
checkToolbar(request);
@@ -1606,8 +1607,8 @@
* Custom XHTML Form for authentication
*/
public void getXHTMLAuthenticationForm(HttpServletRequest request, HttpServletResponse response, Realm realm, String message) throws ServletException, IOException {
- String path = request.getServletPath();
- String backToRealm = org.wyona.yanel.core.util.PathUtil.backToRealm(path);
+ String pathRelativeToRealm = request.getServletPath().replaceFirst(realm.getMountPoint(),"/");
+ String backToRealm = org.wyona.yanel.core.util.PathUtil.backToRealm(pathRelativeToRealm);
try {
org.w3c.dom.Document adoc = getDocument(NAMESPACE, "yanel-auth-screen");
More information about the Yanel-commits
mailing list