java - How to save/open files on server with GWT -
i have birt report i've created in gwt , i'd save server , open up. feel hardcoding url wrong route go (ie c:/files/foo/foo.html) i'm not having luck figuring out way of doing it. tried using gwt.getmodulebaseforstaticfiles() if use unsatisfied link error in birt. can use save/open file, considered best practice? thanks.
edit: bad wording, birt report generated server-side. i'd able save server side , open in new browser window (using window.open i'd imagine?). nothing uploaded client side.
if birt report static file (not generated during runtime of application) can create simple servlet read file , copy data outputstream
of response. if it's generated @ runtime, client request server, server generate , return url location of report. client can open report url.
example:
if birt located under foo/foo.bar can map servlet /foo/*. after mapping user request url www.yourselver.com/foo/foo.bar
servlet @ doget
method can read file , stream content client.
Comments
Post a Comment