Hi,
first, you have to understand that the template will never request
the image. RIFE's templates contain no logic at all. When creating a
template you have to think of the end result, which in this case is a
HTML page. So to request an image, you'll create an img tag and set
the src attribute to a certain URL. You can build this URL any way
you like. Now it's up to you to either give each dynamic image a
unique URL or to create one URL that will dynamically serve different
images. This is normally dictated by your application's requirements.
In the first case, just create a different URL for the image and set
it to a value in the template.
In the second case, you'll probably want to refer to an element that
will decide which image needs to be served. To do that, it's best not
to hardcode the URL, but to create an exit to the image serving
element. You can then generate the URL that triggers the exit with
the setExitQuery method. Inside the image serving element you then
decide which image that needs to be served and stream that out to the
visitor.
Hope this helps,
Geert
On 04 Jun 2006, at 05:17, [EMAIL PROTECTED] wrote:
Hi,
I am new to RIFE, can you please tell me how to define
a template which requests an image from an element?
That is an image which change depends on a value in
the servlet session. How can I do that in the RIFE
template?
Thank you for any help.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users