Hi Madan,

you can't use relative url in tc:image. Every string which is not
recognized as absolute url is used as resourceName to lookup in
resources.

Regards,
 Volker

2007/2/19, madan chowdary <[EMAIL PROTECTED]>:

Hi David,

As i am using Tobago, the URL i specify in <tc:image/> must be an absolute
URL instead of an relative url.

I tried with the code as below which resembles the same as the one u send
me.

<tc:image value="/downloadServlet?id=${content.contentImageId}"
                                             height="100px" width="100px"/>

But the servlet is never called for this.

now i changed the value to an absolute url as shown below


                                            height="100px" width="100px"/>

Now i am able to display the images.

But that should not be the case, i must not specify absolute url.

How to achieve this with relative url ?

Regards,
Madan


----- Original Message ----
From: David Delbecq <[EMAIL PROTECTED]>
To: MyFaces Discussion <[email protected]>
Sent: Monday, 19 February, 2007 4:44:49 PM
Subject: Re: [ Tobago ] Invoke Servlet from jsp page

Sorry, bad cut and paste of your code, it should be, of course,

<h:graphicImage id="image"
   alt="image"
   url="/DownloadBinaryServlet?id=#{groupBox.imageId}">
</h:graphicImage>


En l'instant précis du 02/19/07 11:58, David Delbecq s'exprimait en ces
termes:
> EL expression should do the work:
>
> <h:graphicImage id="image"
>    alt="image"
>
url="/DownloadBinaryServlet?id=#{groupBox.getImageId()}">
> </h:graphicImage>
>
>
> En l'instant précis du 02/19/07 11:51, madan chowdary s'exprimait en ces
> termes:
>
>> Hi All,
>>
>> I have a situation that i need to invoke a servlet which is used to
>> write a image to the page.
>>
>> The image will be retrieved from the database as blob object and then
>> converted to byte[].
>>
>> now i need to display this image in my page.
>>
>> This could probably done with help of a servlet.
>>
>> i need to invoke a servlet with a URL which has an id appened to that
URL.
>>
>> The ordinary JSP code looks like this,
>>
>> <IMG
src="DownloadBinaryServlet?id=<%=groupBox.getImageId()%>
>>
>> The servlet code is as such
>>
>> OutputStream out = response.getOutputStream();
>> out.write( groupBox.getImageBytes() );
>> out.close();
>>
>> But this piece of code does not work in Tobago pages, as <% %>
>> scriplets are not allowed.
>>
>> I need to frame the URL with value ID set to the parameter as above
>> and invoke the servlet .
>>
>> How can i achieve this task .. Any suggestions ?
>>
>> Thnx in advance
>>
>> Regards
>> Madan
>>
>>
>>
>>
------------------------------------------------------------------------
>> Here's a new way to find what you're looking for - Yahoo! Answers
>>
<http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/>
>>
>
>



 ________________________________
 Here's a new way to find what you're looking for - Yahoo! Answers

Reply via email to