incubator-photark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avdhesh Yadav <...@avdheshyadav.com>
Subject Re: Displaying images stored in JCR with Tuscany
Date Fri, 05 Feb 2010 15:20:35 GMT
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)



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.


On Fri, Feb 5, 2010 at 11:19 AM, Luciano Resende <luckbr1975@gmail.com>wrote:

> On Tue, Feb 2, 2010 at 7:46 PM, Avdhesh Yadav <avd@avdheshyadav.com>
> wrote:
> > Right now the uploaded images from admin-ui saved into the file system
> > according to this convention(/gallery/albumname/image) and a key goes to
> the
> > JCR repository.Images should go to JCR repository not to filesystem.what
> I
> > am looking for is how to show the images(inputsream) returned rom the JCR
> > repository using tuscany.I know it can be done using a servlet.But is it
> > possible to do it with tuscany ?
> >
> > Thoughts.
> >
>
> Two ways come to mind:
>
>   - Create a REST service based on the Servlet interface [1]
>
>   - Create a service based on the Tuscany Collection of InputStream,
> and then expose it with the HTTP Binding. [2] This will make a HTTP
> Get file.jpg to be translated to a Collection.get("file.jpg") and the
> file contents are returned to the HTTP client application.
>
> Well, this is very high level, but can get you started... please fire
> questions my way ... I'll have more time in the next couple days to
> take a look at this with more time.
>
> [1]
> https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileServiceImpl.java
> [2]
> https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/Resource.java
>
> --
> Luciano Resende
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
Avdhesh Yadav
http://www.avdheshyadav.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message