Hi Ian,
      Idea of getting file from href="/results/xml_5.6_46.2.xls" works
for me now. (Thanks so much for giving this IDEA).

However what I was doing before was, depending on user input,I will
dynamically generate these reports and save them on server disk and
when ever user clicks on link,File is downloaded with HTML link = new
HTML("<a href=\"d:/nas/local/results/xml_5.6_46.2.xls \">Download
Report</a>"); (which had issue and is resolved now with your IDEA of
keeping file in href="/results/xml_5.6_46.2.xls" ).

Now my problem is,I am not able to generate reports and save them at "/
results/"  location.

I am using below code in my java program with try catch block to save
file.However file is not getting generated/saved.(even I am not
getting any exceptions)

FileOutputStream fileOut = new FileOutputStream("/reports/
xml_5.6_46.2.xls");
wb.write(fileOut);
fileOut.close();

Am I doing anything wrong in giving paths. (This was working fine when
I give disk drive eg: d:/reports/xml_5.6_46.2.xls).


On Sep 20, 7:28 am, Ian Bambury <[email protected]> wrote:
> Put the file in the same place as your index.htm or, say, in a subdirectory
> called /results/
> Don't use the disk letter, just use something like
>
> href="results/xml_5.6_46.2.xls"
>
> Ian
>
> http://examples.roughian.com
>
> 2009/9/20 sathya <[email protected]>
>
>
>
>
>
> > Hi Ian,
> >         I am developing this application on my system and running it
> > IP "localhost:8080".
> > So tomcat server  is setup on my same system where i am testing or
> > opening this page. So path I have given is D:\ drive(so D:\ acts as
> > server disk and also client disk).Problem is, it works with FF but
> > facing problem with only IE
>
> > If you are not able to get what I am writing, Just give me sample
> > example code to do the following task.
>
> > --> whenever i click download link, file on server should get
> > downloaded from server to client.(File is placed on server disk at
> > specific location).But this should work in IE also without any
> > problem.
>
> > Can you please more details of statement "I think you need a relative
> > path to somewhere in the document root of your
> > server or a subdirectory of it. "
>
> > On Sep 18, 4:49 am, Ian Bambury <[email protected]> wrote:
> > > Hi Sathya,
> > > I'm not sure what you are doing is what you really want.
>
> > > <a href=\"d:/nas/local/results/xml_5.6_46.2.xls\">Download Report</a>
> > > is pointing to a file on the client's machine - is it likely to be there?
> > > And if it is there, why do they need to download it from their own
> > machine?
>
> > > I think you need a relative path to somewhere in the document root of
> > your
> > > server or a subdirectory of it.
>
> > > Ian (not Lan)
>
> > >http://examples.roughian.com
>
> > > 2009/9/18 sathya <[email protected]>
>
> > > > Hi Lan,
> > > >     Whenever I click on link,Nothing seems to work.I get error at
> > > > left bottom corner of IE saying access denied with script path.
> > > > I am not sure how to attach screen short here.So sending screen short
> > > > to your mail.
>
> > > > On Sep 17, 4:01 pm, Ian Bambury <[email protected]> wrote:
> > > > > What error is it reporting?
> > > > > Ian
>
> > > > >http://examples.roughian.com
>
> > > > > 2009/9/17 sathya <[email protected]>
>
> > > > > > Hi Lan,
> > > > > >     I am using below HTML link instead of window. Open ().I am
> > facing
> > > > > > same problem.
>
> > > > > > When I click on link, download is successful with firefox.However
> > this
> > > > > > link is not working in IE.When I click on link in IE, it says page
> > > > > > error (left bottom).Please help me in fixing this.
>
> > > > > > HTML link = new HTML("<a
> > href=\"d:/nas/local/results/xml_5.6_46.2.xls
> > > > > > \">Download Report</a>");
> > > > > >        full_report.add(link);
>
> > > > > > On Sep 16, 6:39 pm, Ian Bambury <[email protected]> wrote:
> > > > > > > The simplest way is just to put an anchor on the page called
> > > > 'Download'
> > > > > > but,
> > > > > > > depending on how the browser is set up, the browser may open it
> > > > rather
> > > > > > than
> > > > > > > download it which may not be what you want. It *is* however, what
> > the
> > > > > > user
> > > > > > > set up (or got lumbered with) as the default.
> > > > > > > Anything more than that requires that you do things on the
> > server,
> > > > and
> > > > > > that
> > > > > > > a) depends what you are using on the server, and b) is more
> > > > appropriate
> > > > > > on a
> > > > > > > Java or PHP (or whatever) forum since GWT is just client-side.
>
> > > > > > > Ian
>
> > > > > > >http://examples.roughian.com
>
> > > > > > > 2009/9/16 sathya <[email protected]>
>
> > > > > > > > Hi Bambury,
> > > > > > > >       Can you help me in implementing this. My scenario is, I
> > have
> > > > > > > > file on server disk. When ever client requests for it (when
> > ever he
> > > > > > > > presses download button), file should get downloaded to client.
> > Can
> > > > > > > > you tell me how can I implement this.
>
> > > > > > > > On Sep 16, 4:02 pm, Ian Bambury <[email protected]> wrote:
> > > > > > > > > And even if there just happens to be a file named like that,
> > your
> > > > > > popup
> > > > > > > > will
> > > > > > > > > probably be blocked.- Hide quoted text -
>
> > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to