It's doesn't work.
My project directory structure is:
/home/dany/TESI/projects/WebPhotoGallery/
-- build/
-- src
-- com
-- webphotogallery
-- server
-- category
-- [...]
-- client
-- public
-- tomcat
-- WebConten
(I use Eclipse with Cypal studio plugin)
On servlet, the code for create category directory is:
private static String UPLOAD_DIRECTORY =
"./src/com/webphotogallery/server/category/";
[...]
if((it.getFieldName().equals("categoryBox"))){
String categoryFolder = it.getString();
UPLOAD_DIRECTORY = UPLOAD_DIRECTORY +
categoryFolder;
[...]
where categoryFolder is passed by client with a form.
But when I call setURL() method on client, what URL I put??
http://localhost:8888/com.webphotogallery.WebPhotoGallery/category/categoryName!?!?
not works.
I'm totally disoriented.
Thanks.
Daniele.
2008/12/28 Daniele <[email protected]>:
> Sorry, but I'm newbie of servlet & GWT...I'm here for learning GWT and
> servlet :)
> I try.
> Thanks.
>
> Daniele.
>
> 2008/12/28 rakesh wagh <[email protected]>:
>>
>> Cannot comment on what you are doing wrong without looking into the
>> code. However I see no need for setUrl on server side. You should have
>> a "Servlet" that will parse the parameters, read the appropriate image
>> file(either file system or db or any doc mgmt system for that matter),
>> set a proper content type and just spit out the byte stream.
>>
>> From the client just call this servlet with appropriate params for it
>> to retrieve the image. In essence:
>> Image img = new Image();
>> img.setUrl("/servlet?photoId=39934&width=50");
>>
>> Rakesh Wagh
>>
>> On Dec 26, 4:26 pm, Daniele <[email protected]> wrote:
>>> I cannot planning image manipulation.
>>> If images are on client sides, setUrl() etc it works.
>>>
>>> On server side, I have an undefined number of folders that represent
>>> photo category, but if I put on setUrl() method path to folders on
>>> server, it's not work.
>>>
>>> 2008/12/26 rakesh wagh <[email protected]>:
>>>
>>>
>>>
>>> > ask yourself:
>>> > Even if you get your image/files using rpc, what will you do with it?
>>> > I mean there is no real application of getting binary files using rpc
>>> > yet. Are you planning to do image manipulations like rotation,
>>> > filters, etc on the client side? js is not yet ready for that. However
>>> > if you wish, you can get the entire file using rpc method. But
>>> > sticking it to the image tag is very difficult. Search through the
>>> > group, some one mentioned how you can embed the actual bytes and
>>> > construct a img tag that will display the image. Good luck, because
>>> > that is very non standard and your millage can greatly vary.
>>>
>>> > You might also want to look at Gears, it allows you to store and
>>> > retrieve Blobs in client database... not sure if it has to do anything
>>> > with your requirement but will come handy if you are playing a lot
>>> > with files etc. ..
>>>
>>> > Rakesh Wagh
>>>
>>> > On Dec 24, 8:01 am, Daniele B <[email protected]> wrote:
>>> >> Hi.
>>> >> I work on a photogallery application for my thesis.
>>> >> I have a problem.
>>> >> How can I do to retrieve image files stored on a server folder trought
>>> >> GWT-RPC?
>>>
>>> >> Thanks at all!
>>> >> Sorry fo my english!!! :)
>>>
>>> >> Daniele.
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---