Hi,
Following code may help you :
1)Return your file path as 'String' from server side code i.e.
File file = File.createTempFile("Export ", ".xls");
String path = file.getAbsolutePath();
file.deleteOnExit();
return path;
2) Access this String (path) on client side : (You have to write a servlet
"downloadExcel" )
public void onSuccess(String result) {
String link = (String) result;
link = GWT.getModuleBaseURL() + "downloadExcel?tempid=" +
link;
Window.open(link, "",
"menubar=no,location=yes,resizable=no,scrollbars=no,status=no,toolbar=false,
width=" + 25
+ ",height=" + 25);
}
3) This file will get created under C:/windows/temp/..
I hope that this would be your resolution. :)
On Mon, Apr 20, 2009 at 11:05 PM, Neo <[email protected]> wrote:
>
> Hi,
> I am trying to create a file using some server side code. The file
> gets created in the Project's root directory ?
> Is there a way to create a file inside the public directory of the
> application or atleast copy it to the public directory ?
> Once the file is created I want to read this file from my client side
> code. Right now I am not able to do so as the client side code has no
> access to resources outside the public directory :(
> Please help me out in this.
> If you know of any better approach please tell m
> >
>
--
CHEERS........
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---