Re: calling doGet() on the server from a hidden IFrame

2008-11-10 Thread [EMAIL PROTECTED]

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-nameSignoffServiceImpl/servlet-name
     servlet-classcom.paretopartners.signoff.server.SignoffServiceImpl/
   servlet-class
     load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
     servlet-nameSignoffServiceImpl/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
-~--~~~~--~~--~--~---



calling doGet() on the server from a hidden IFrame

2008-11-07 Thread [EMAIL PROTECTED]

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-nameSignoffServiceImpl/servlet-name
  servlet-classcom.paretopartners.signoff.server.SignoffServiceImpl/
servlet-class
  load-on-startup1/load-on-startup
/servlet
servlet-mapping
  servlet-nameSignoffServiceImpl/servlet-name
  url-pattern/signoff/url-pattern
/servlet-mapping


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: calling doGet() on the server from a hidden IFrame

2008-11-07 Thread [EMAIL PROTECTED]

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-nameSignoffServiceImpl/servlet-name
   servlet-classcom.paretopartners.signoff.server.SignoffServiceImpl/
 servlet-class
   load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
   servlet-nameSignoffServiceImpl/servlet-name
   url-pattern/signoff/url-pattern
 /servlet-mapping
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: calling doGet() on the server from a hidden IFrame

2008-11-07 Thread gregor

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-nameSignoffServiceImpl/servlet-name
    servlet-classcom.paretopartners.signoff.server.SignoffServiceImpl/
  servlet-class
    load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
    servlet-nameSignoffServiceImpl/servlet-name
    url-pattern/signoff/url-pattern
  /servlet-mapping
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---