On Fri, Feb 5, 2010 at 7:20 AM, Avdhesh Yadav <[email protected]> wrote:
> I tried second way.implemented Collection interface.and able to show the
> image at path http://192.168.1.3:8080/photark/PhotoDisplayer..i hard coded
> image key in get method..
>
> Now i want to make it dynamic..show image with provided image key.(
> http://192.168.1.3:8080/photark/PhotoDisplayer?image=test.jpg)
>

The HTTP Binding expects a REST style uri, and not a query string.
You should try something like:

http://192.168.1.3:8080/photark/PhotoDisplayer/test.jpg

>
> public InputStream get(String key)throws NotFoundException{
>        System.out.println("get Key:"+key);
>        ------
>        ---}
>
> somehow the key is always printing splayer.How to get the parameter in the
> get method. i suppose that i should get it with key.but i always getthing
> the splayer.
>

BTW, with the query string, I would expect the query method from
collection to be invoked instead of the get.... unless you have the
simplified version of the collection api that dos not make use of the
query method.

-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Reply via email to