How to download file from RAP [message #61538] |
Wed, 21 November 2007 16:54 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dp-conde.criticalsoftware.com
Hello,
I'm looking for a way to download a file from the server.
I think I might need to implement something like a File Download Servlet
that should extend HttpServlet, to manage the communication between the
server and the client.
Anyone more expert in this topic could confirm or give me some tips
about this?
Thanks in advance,
Daniel Conde.
|
|
|
|
|
Re: How to download file from RAP [message #63358 is a reply to message #63311] |
Tue, 27 November 2007 14:30 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: wen.ai.gillardon.de
Hello Tiago,
I have done like this:
1. create a custom widget (you could let it be unvisible)
2. click a RAP download button, pass infos to js with this widget
3. hide a iframe with download-form inside the js and let this
form-action point to a download-servlet
4. if the browser receives the command for upload, submit this download form
5. download servlet reads the file from memory and begin to download
5. the user could decide to download it or not, if yes, servlet does the
job forward
6. send a response from servlet to browser after download is finished
7. send a request from js to rap and tell rap what rap should do ...
I hope this can help.
Greetings
Wen
Tiago schrieb:
> Hi,
>
> I would also like be able to click on a RAP button a download a file. I'm
> creating my file in memory so I don't need equinox resources. I just don't
> know how to return the file to the user.
> Can you help me?
>
> Tiago
>
> "Benjamin Muskalla" <bmuskalla@innoopract.com> wrote in message
> news:fi3pep$2pm$1@build.eclipse.org...
>> Hi,
>>
>> take a look at
>> http://www.eclipse.org/equinox/server/http_writing_applicati on.php
>> regarding the org.eclipse.equinox.http.registry.resources extension point
>> which helps you to provide static content for your application.
>>
>> Greets
>> Benny
>>
>> Daniel Conde wrote:
>>> Hello,
>>>
>>> I'm looking for a way to download a file from the server.
>>> I think I might need to implement something like a File Download Servlet
>>> that should extend HttpServlet, to manage the communication between the
>>> server and the client.
>>>
>>> Anyone more expert in this topic could confirm or give me some tips
>>> about this?
>>>
>>> Thanks in advance,
>>> Daniel Conde.
>
>
|
|
|
Re: How to download file from RAP [message #63968 is a reply to message #63358] |
Mon, 03 December 2007 14:40 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
without having tried it too hard using a button and a browser widget should
do the trick:
Button button = new Button( parent, SWT.PUSH );
button.setText( "push me" );
final Browser browser = new Browser( parent, SWT.NONE );
button.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( final SelectionEvent evt ) {
browser.setUrl( "linkToMyDownload.zip" );
}
} );
The browser could be 'hidden' for example by setting its size to 0,0. For in
memory data the URL should point to an additional servlet or a
servicehandler. Using the Hyperlink component of forms instead of a button
would make it look like a real web link.
Hope that works...
Ciao
Frank
"Wen Ai" <wen.ai@gillardon.de> schrieb im Newsbeitrag
news:fih9la$jn9$1@build.eclipse.org...
> Hello Tiago,
>
> I have done like this:
> 1. create a custom widget (you could let it be unvisible)
> 2. click a RAP download button, pass infos to js with this widget
> 3. hide a iframe with download-form inside the js and let this form-action
> point to a download-servlet
> 4. if the browser receives the command for upload, submit this download
> form
> 5. download servlet reads the file from memory and begin to download
> 5. the user could decide to download it or not, if yes, servlet does the
> job forward
> 6. send a response from servlet to browser after download is finished
> 7. send a request from js to rap and tell rap what rap should do ...
>
> I hope this can help.
>
> Greetings
>
> Wen
>
>
> Tiago schrieb:
>> Hi,
>>
>> I would also like be able to click on a RAP button a download a file. I'm
>> creating my file in memory so I don't need equinox resources. I just
>> don't know how to return the file to the user.
>> Can you help me?
>>
>> Tiago
>>
>> "Benjamin Muskalla" <bmuskalla@innoopract.com> wrote in message
>> news:fi3pep$2pm$1@build.eclipse.org...
>>> Hi,
>>>
>>> take a look at
>>> http://www.eclipse.org/equinox/server/http_writing_applicati on.php
>>> regarding the org.eclipse.equinox.http.registry.resources extension
>>> point which helps you to provide static content for your application.
>>>
>>> Greets
>>> Benny
>>>
>>> Daniel Conde wrote:
>>>> Hello,
>>>>
>>>> I'm looking for a way to download a file from the server.
>>>> I think I might need to implement something like a File Download
>>>> Servlet that should extend HttpServlet, to manage the communication
>>>> between the server and the client.
>>>>
>>>> Anyone more expert in this topic could confirm or give me some tips
>>>> about this?
>>>>
>>>> Thanks in advance,
>>>> Daniel Conde.
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04583 seconds