That yields the path from webroot to the JSP, rather than the virtual page and URL the JSP is based on...
"/magnoliaAuthor/templates/jsp/ud/udpage1.jsp" request.getContextPath yields "magnoliaAuthor" request.getURI() yields a bland screen (its actually for finding the URI of a taglib) request.getRealPath() yields a blank screen HttpUtils.getRequestURL(request) yields a blank screen No, I think the elegant answer is to use a method build into the Magnolia API. If you can get a virtual page title, I think you can get a virtual page name. I suppose it would not have any extra path that might be there though, eh? I guess I can compose a scriptlet, with an iterator object, iterate & output all the node data, and see if the page name pops up? -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 1:35 AM To: [email protected] Subject: Re: [magnolia-user] sharing contents #: Robert Van Overmeiren changed the world a bit at a time by saying on 10/14/2005 1:24 AM :# > This gets me the page title... > > <%@ page import="info.magnolia.cms.util.Resource" %> > String title = > Resource.getActivePage(request).getNodeData("title").getString(); > > ...but don't know how to get the virtual url. > > > > I can get the URL, replace the '.html' with nothing, then slice off > the whole leading part (protocol, domain, host, magnoliaAuthor), but > that's not very elegant or portable... > is request.getRequestURI solving the problem? > [sorry for trimming the rest ... ] ./alex -- .w( the_mindstorm )p. ---------------------------------------------------------------- for list details see http://www.magnolia.info/en/magnolia/developer.html ---------------------------------------------------------------- ---------------------------------------------------------------- for list details see http://www.magnolia.info/en/magnolia/developer.html ----------------------------------------------------------------
