title: Image URL when previewed in Notes and in Web Browser
body: <p>Lets say we have a XPage with following code snippet which displays an image using javascript formula:</p>
  
  <pre><code>&lt;xp:image id="image1"&gt;&lt;xp:this.url&gt;&lt;![CDATA[#{javascript:"actn005.gif"}]]&gt;&lt;/xp:this.url&gt;&lt;/xp:image&gt; 
  </code></pre>
  
  <p>actn005.gif is present in the current database as image resource. When I click on the "Preview in Notes" and get the source it displays something like this for Image:</p>
  
  <pre><code>&lt;img id="view:_id1:image1" src="/xsp/Naveen/Experiments.nsf/xsp/actn005.gif" alt="" class="xspImage"&gt;
  </code></pre>
  
  <p>When I click on the "Preview in Web Browser" and get the source it displays something like this for Image:</p>
  
  <pre><code>&lt;img id="view:_id1:image1" src="/Naveen/Experiments.nsf/actn005.gif" alt="" class="xspImage"&gt; 
  </code></pre>
  
  <p>You can see that in case of "Preview in Notes" it adds <strong>xsp</strong> before and after the path of the database. My question is WHY? The image displays in both cases with no issues. But if I have XPage which renders image lets call it - XPage_Rendering_Image.xsp. Because of which the XPage code</p>
  
  <pre><code>&lt;xp:image id="image1"&gt;&lt;xp:this.url&gt;&lt;![CDATA[#{javascript:"XPage_Rendering_Image.xsp"}]]&gt;&lt;/xp:this.url&gt;&lt;/xp:image&gt; 
  </code></pre>
  
  <p>renders as: </p>
  
  <pre><code>&lt;img id="view:_id1:image1" src="/xsp/Naveen/Experiments.nsf/xsp/XPage_Rendering_Image.xsp" alt="" class="xspImage"&gt; 
  </code></pre>
  
  <p>and then it FAILS!  I posted this question earlier on XPages forum and was suggested using a normal image tag like</p>
  
  <pre><code>&lt;img src="#{javascript:'XPage_Rendering_Image.xsp'}" alt="" class="xspImage" /&gt;.
  </code></pre>
  
  <p>But is there a way to make this work using <code>&lt;xp:image&gt;</code> tag? Is this a bug?</p>