Im not doing any parsing of the csv in JS. In my actual app im
writting the text out to PrinterWriter. And doing it this way allows
me to use the standard browser download popups and file navigation. It
works perfectly in hosted and web mode but when deployed to tomcat
doGet() on the server is not being called

On Nov 7, 9:02 pm, gregor <[EMAIL PROTECTED]> wrote:
> Hi Steve,
>
> I would venture it might pay you to read and translate your CSV file
> into a List of DTO objects (each, say, representing a line of CSV
> text) within a GWT RPC method that sends this List back over the wire
> - GWT RPC will handle all that for you. Easier, and I think parsing
> the CSV might be quicker on the server in Java than slogging through
> it on the client in javascript. Also, depending on your use case, you
> might be able to cache it server side.
>
> If that doesn't work for you, then look at
> com.google.gwt.user.client.HTTPRequest docs.
>
> regards
> gregor
>
> On Nov 7, 5:26 pm, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Its probably worth noting that i have other RPC methods that DO invoke
> > the server. but i guess this isnt a standard RPC mechanism and if it
> > is it isnt setup like the others.
>
> > Thanks in advance,
> > Steve
>
> > On Nov 7, 5:04 pm, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > Im downloading a csv file from the server in a doGet method. This
> > > works perfectly in hosted and web mode but not when deployed so i
> > > assume i am configuring something wrong as the doGet method never gets
> > > called.
>
> > > client code is:
>
> > > private void download(String search) {
> > >     Log.warn("requesting csv from server");
> > >     String link = GWT.getModuleBaseURL() + "/signoff";
> > >     if (search != null && search.length() > 0) {
> > >       link += '?' + URL.encode(search);
> > >     }
> > >     DOM.setElementAttribute(RootPanel.get("__download").getElement(),
> > > "src", link);
>
> > > }
>
> > > html body is:
>
> > > <body>
> > >     <script type="text/javascript" language="javascript"
> > > src="com.paretopartners.signoff.signoffClient.nocache.js"></script>
> > >     <iframe id="__gwt_historyFrame" style="width:0;height:0;border:
> > > 0"></iframe>
> > >     <iframe src="" id="__download" style="width:0;height:0;border:0"></
> > > iframe>
> > > </body>
>
> > > my server has the doGet method:
>
> > > protected void doGet(final HttpServletRequest req, final
> > > HttpServletResponse resp) throws
> > >         IOException {
> > >     log.log(Level.WARN, "downloading CSV");
>
> > > }
>
> > > And as i said i think this is almost certainly a config issue but i
> > > cant seem to work it out. my web.xml currently contains:
>
> > > <servlet>
> > >   <servlet-name>SignoffServiceImpl</servlet-name>
> > >   <servlet-class>com.paretopartners.signoff.server.SignoffServiceImpl</
> > > servlet-class>
> > >   <load-on-startup>1</load-on-startup>
> > > </servlet>
> > > <servlet-mapping>
> > >   <servlet-name>SignoffServiceImpl</servlet-name>
> > >   <url-pattern>/signoff</url-pattern>
> > > </servlet-mapping>- 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 Google-Web-Toolkit@googlegroups.com
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