You don't use doGet() in RPC servlets, you call methods specified in the RemoteService interface. Perhaps a better way is to transfer your data to client is create a simple DTO class that represents a row of data. You then return a List of these DTO's from your RPC servlet method. Create the DTO's by iterating through the result set of your SQL query. This is lot easier and more efficient than parsing a CSV string client side.
On Feb 17, 1:30 pm, ytbryan <[email protected]> wrote: > hi all, > i am not sure if i am doing the right thing. > > i put a doGet() in my MySQLConnServiceImpl class which extends the > remoteserviceservlet. > > because i want to call the class so that it can allow me to download a > csv. > > but i got this error when i call it from my client class. > > my client method > public void onClick(BaseItem button, EventObject e) { > Window.open("http://www.localhost:8888/ > com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl", > "testing", ""); > > } > > my MySQLConnServiceImpl doGet > > response.setContentType("text/plain"); > response.setHeader("Content-Disposition", "attachment; > filename=myjdbcfile.csv"); > PrintWriter out = response.getWriter(); > FileWriter fw = new FileWriter(filename); > fw.append("Date"); > fw.append(','); > fw.append("Sourceforge"); > fw.append(','); > fw.append("Trial"); > fw.append(','); > fw.append("Sale"); > fw.append(','); > fw.append("OSTrial"); > fw.append(','); > fw.append("TrialSale"); > fw.append(','); > fw.append("OSSale"); > fw.append('\n'); > . > . > . > . > > The website is encountering problems. > There might be a typing error in the address. > > What you can try: > Check your Internet connection. Try visiting another website to > make sure you are connected. > > Retype the address. > > Go back to the previous page. > > More information > > This problem can be caused by a variety of issues, including: > > Internet connectivity has been lost. > The website is temporarily unavailable. > The Domain Name Server (DNS) is not reachable. > The Domain Name Server (DNS) does not have a listing for the website's > domain. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
