Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to download file from RAP
How to download file from RAP [message #61538] Wed, 21 November 2007 16:54 Go to next message
Eclipse UserFriend
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 #62027 is a reply to message #61538] Thu, 22 November 2007 11:30 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
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 #63311 is a reply to message #62027] Tue, 27 November 2007 11:48 Go to previous messageGo to next message
Tiago is currently offline TiagoFriend
Messages: 55
Registered: July 2009
Member
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 #63358 is a reply to message #63311] Tue, 27 November 2007 14:30 Go to previous messageGo to next message
Eclipse UserFriend
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
Eclipse UserFriend
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.
>>
Previous Topic:Problem during starting Bundle
Next Topic:freeing resources exiting SWT
Goto Forum:
  


Current Time: Thu Apr 25 00:31:58 GMT 2024

Powered by FUDForum. Page generated in 0.02951 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top