initial-content.libs.sling.servlet.default.moveto.jsp Maven / Gradle / Ivy
<%--
/************************************************************************
** $Date: $
** $Source: $
** $Author: $
** $Revision: $
************************************************************************/
--%><%
%><%@page session="false" contentType="text/html; charset=utf-8" %><%
%><%@page import="java.io.*,
java.net.*,
javax.jcr.*,
org.apache.sling.api.resource.*,
utils.*"
%><%
%><%@ taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
%> <%
String cpath = slingRequest.getRequestPathInfo().getResourcePath();
String rpath = slingRequest.getRequestPathInfo().getSuffix();
Resource res = resource.getResourceResolver().resolve(rpath);
Node node = res.adaptTo(Node.class);
String parentPath = "/";
if (resource.getParent() != null) parentPath = resource.getParent().getPath();
%>