1 package org.apache.turbine.util.uri;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.turbine.Turbine;
20
21 /***
22 * Bundles a few static routines concerning URIs, that you
23 * will need all the time.
24 *
25 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
26 * @version $Id: URIUtils.java 264148 2005-08-29 14:21:04Z henning $
27 */
28
29 public abstract class URIUtils
30 {
31 /***
32 * Convert a given Path into a Turbine Data URI. The resulting
33 * path contains no path_info or query data. If you have a current
34 * runData object around, you should use DataURI and setScriptName()!.
35 *
36 * @param path A relative path
37 *
38 * @return the absolute path for the request.
39 *
40 */
41
42 public static String getAbsoluteLink(String path)
43 {
44 DataURI du = new DataURI(Turbine.getDefaultServerData());
45 du.setScriptName(path);
46 return du.getAbsoluteLink();
47 }
48 }