Paul Clapham wrote: I assume there's a JSF equivalent to the standard "image servlet".
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:
Paul Clapham wrote: I assume there's a JSF equivalent to the standard "image servlet".
You assume wrong, Paul. JSF in its standard configuration renders HTML and only HTML meaning text conforming to the appropriate RFCs, not binary data, XML, or other stuff. If you want anything else, use a servlet. Or a JSP. JSPs are good for XML output.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Davie Lin wrote:Hey guys,
I hope this thread is not too old to revive. so here is what I am thinking, If I get a byte[] back from a web service call and I will save this byte[] as an attribute in ServletContext. Now this part is done in JSF backing bean. When the user click the link to display the image, I have a servlet to look up the attribute in ServletContext and flush out the byte[] to the user. Does this sound reasonable?
Thanks
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:Just store it in a session-scope bean.
Davie Lin wrote:
Tim Holloway wrote:Just store it in a session-scope bean.
Tim,
what is this session-scope bean that you were talking about? Is the session-scope bean the same as a managed-bean in session scope? I sure hope not because I thought JSF were not suppose to handle raw binary data. Can you elaborate a little more? Are you suggesting that I don't need to use ServletContext or a servlet?
Thanks
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:A session-scope bean and a JSF session-scope Managed Bean are one and the same thing. Which is to say, a JavaBean that can be located by obtaining the user's HttpSession object and using the getAttribute() method. The only difference between a traditional J2EE session object and the JSF one is that JSF constructed and initialized it. After that, it's completely impossible to tell the two types of session objects apart.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |