You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Sylvain Vieujot <sv...@apache.org> on 2004/12/30 23:52:25 UTC

Integrated generic servlet

First, 3 examples of the problem :

1 - I have a client object with a logo (image), and I want to display
the logo in the client's form.
The only solution to do this now is to use a <h:graphicImage url="..."/>
and to have the url point to a special purpose servlet.

2 - In the <x:htmlEditor> component, I want to allow the user to upload
images, and then have a standard way to deliver this image back.
I have no easy solution for this right now.

3 - I want to make an extension to the <x:inputText> that works like
google suggest : http://www.google.com/webhp?complete=1&hl=en
This means I need a special purpose servlet that given the initial
characters would return possible completions.

Sure, for each of those cases, we can ask the developer to write special
purpose servlets, but the list of those servlets can grow quite quickly,
and this doesn't help to do RAD.
So, I'm looking for a solution that would help solve those kind of
problems.

My first guess is that we could add this functionality to the extensions
filter (like we do to serve embedded resources).
But I immediately see 2 problems :
1 - How get the backing bean binding.
I guess this isn't too hard to solve using the JSF managed beans
creation facility.

2 - Security
How can we prevent a security breach via this facility, as it would have
a unique URL, and no web container security can be applied.

Any thought on how to solve this ???

Thanks and happy new year to everybody.

Sylvain.