<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, <br>
<br>
please use the filetranslator or <br>
<font size="2" face="Trebuchet MS"></font><br>
<font size="2" face="Trebuchet MS">String uri =
cms.getRequestContext().getUri();
</font>
<br>
<font size="2" face="Trebuchet MS">String tempUri= </font>cms.getRequestContext().removeSiteRoot(uri);<br>
<br>
to get rid of a potential site root. In your case there is surely no
"/sites/default" in the URI thus the IndexOutOfBounds exception as
you try to access the second element which does not exist. <br>
The rest of the code looks ok. <br>
<br>
\Fabian<br>
<br>
<br>
<br>
On 29.06.2011 15:11, Raghu D wrote:
<blockquote
cite="mid:OF477A1EDE.AE748773-ON652578BE.0047E338-652578BE.00487850@ibsplc.com"
type="cite"><font size="2" face="Trebuchet MS">CmsJspActionElement
cms = new CmsJspActionElement
(pageContext, request, response);</font>
<br>
<font size="2" face="Trebuchet MS">CmsObject cmso =
cms.getCmsObject();</font>
<br>
<font size="2" face="Trebuchet MS">String uri =
cms.getRequestContext().getUri();
</font>
<br>
<font size="2" face="Trebuchet MS">String tempUri=
uri.split("/sites/default")[1]
; </font>
<br>
<font size="2" face="Trebuchet MS">CmsFile file =
cmso.readFile(tempUri)
;</font>
<br>
<font size="2" face="Trebuchet MS">CmsXmlContent xmlContent =
CmsXmlContentFactory.unmarshal(cmso,file);</font>
<br>
<font size="2" face="Trebuchet MS">String message =
xmlContent.getValue("Link",
enLocale, 0).getStringValue(cmso);</font>
</blockquote>
<br>
</body>
</html>