All right, I guess...
StringBuffer req_url = request.getRequestURL();
String req_url2 = req_url.toString();
String page_uri = req_url2.substring(req_url2.lastIndexOf("/") + 1);
String[] page_uri2 = StringUtils.split(page_uri, ".");
...gets the page's name, but content re-use using loadPage doesn't seem
to work in 2.0.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 05, 2006 6:24 AM
To: [email protected]
Subject: Re: [magnolia-user] Path.getOriginalURI(request) = cannot
resolve symbol : class Path
You might want to take a look at the servlet API at
http://tomcat.apache.org/tomcat-5.0-doc/servletapi/index.html.
Specifically javax.servlet.http.HttpServletRequest has a number of
methods for returning different parts of the request URL.
--David
(Robert Van Overmeiren) wrote:
>I mounted & browsed magnolia2-core.jar & see that 'core' doesn't have
>'Path'. It has 'util.Path' which doesn't have 'getOriginalURI()'. It
>has things like
'(info.magnolia.cms.util).Path.getCacheDirectoryPath()'.
>
>I'll have to go through the core & util methods to see if one returns
>the original URI.
>
>Are the Magnolia classes all documented like the sun java docs with
>field, constructor, & method summary & detail?
>
>
>-----Original Message-----
>From: [email protected] [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, January 04, 2006 9:36 AM
>To: [email protected]
>Subject: [magnolia-user] Path.getOriginalURI(request) = cannot resolve
>symbol : class Path
>
>Hello,
>
>My org still runs 2.0.3, but I've done a bit of development on 2.1.
>With 2.1, I've been able to use 'loadPage' to reuse content, if I get
>the original URI and use loadPage again to reload the current page
>after the shared content.
>
>To get the original URI, I've used...
>
>String page_uri =
>(info.magnolia.cms.core).Path.getOriginalURI(request);
>&
><c:set var="page_uri"><%=
>(info.magnolia.cms.core).Path.getOriginalURI(request) %></c:set> &
>String page_uri =
>(String)request.getAttribute(info.magnolia.cms.core.Path.JAVAX_FORWARD_
>S
>ERVLET_PATH);
>
>
>
>I've returned to my 2.0.3 setup to try & implement content reuse. With
>all 3 of the above syntaxes, I get this in the log...
>
> cannot resolve symbol : class Path
>
>
>Are the syntaxes for getting the original URI different between 2.0 &
>2.1?
>What can I use in 2.0 to get the original URI?
>
>Regards,
>Bob V
>
>
>
>
>----------------------------------------------------------------
>for list details see
>http://www.magnolia.info/en/magnolia/developer.html
>----------------------------------------------------------------
>
>----------------------------------------------------------------
>for list details see
>http://www.magnolia.info/en/magnolia/developer.html
>----------------------------------------------------------------
>
>
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------