Setup Database Access in Development Mode
Hello, I started an other thread dealing with file write access on the server side. After reading the responses I am assured that the better solution would be to store the available data in a database. I am able to find some information on how to access a sql database in general. But I have no idea how to test database access in development mode. I am using eclipse to develop my gwt application. Does anyone has some input on this topic? Thanks and best regards Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Saving Object to fole on Server
Hi hth, thanks for the response. Sorry I am not this familiar with file operations. Maybe we can start from scratch: I want to store an object on the server for later use. The Object should persist on the server even if the server is restarted. For several reasons, I do not like to store the Object in a database. Can anybody give me a hint how to achieve this best? Thanks Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Saving Object to fole on Server
Does anyboday has some Idea? Best regards Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Saving Object to fole on Server
Hi Raphael, thanks for your prompt response. I will look for the log file and check if there is something in it. This is server-side code. Is it possible that I have no write access to the folder? If yes, how could I change this running in development mode? If what I am doing is too much of a security risk, what alternative do I have? I just need to store a Java-Object on the server for later use. Thanks and best regards, Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Saving Object to fole on Server
Hi everybody, I need to save an Java Object (List or hashmap) to the server so I can load it later If required. My first attempt looks like this: ArrayListString al = new ArrayListString(); URL url; try { url = new URL(http://127.0.0.1:/Resources/test.obj;); URLConnection urlc = url.openConnection(); BufferedOutputStream buf = new BufferedOutputStream(urlc.getOutputStream()); ObjectOutputStream os = new ObjectOutputStream(buf); os.writeObject(al); buf.close(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); But the file on the server is not created. Also no error is thrown. Can porbaby anybody help me? Any support will be highly appreciated ;) Best regards Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Accessing files on Server: Development works, Hosted does not
Hi all I have problems accessing files stored on the server side in hosted mode. Development mode workis fine! The file data.xls is stored in war/resources/ I access the FIle using File f = new File(resources/data.xls) This works fine in development mode. In hosted mode, running on TOMCAT, I get an Exception saying that the given file path is invalid. Can anybody help me? What is the path referencing the file in hosted mode? Best regards and thanks in advance, Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
fileupload does not work with files larger than around 15kb: ACCESS DENIED!
Hi all, I am currently working on an gwt application where the client needs to upload some files on the server so they can undergo some further processing. I found the Servlet shown below in some Tutorial that, invoked by the client, should allow me to upload a file to the server. Interestingly, this works for small files (text and binary) a far as they are not larger than something around 15 kb. Otherwise, I get an error looking like this: access denied (java.io.FilePermission /var/folders/iw/iwDgjwOcEVqjzDb6t18ytnj1v9w/- Tmp-/upload_78b21457_132f972f394__8000_0010.tmp write) Help would be much apreciated! Thanks in advance! Best Regards, Uli PS: And here comes the code: public class FileUploadServlet extends HttpServlet implements Servlet { private static final long serialVersionUID = 8305367618713715640L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/plain); FileItem uploadItem = getFileItem(request); if (uploadItem == null) { response.getWriter().write(NO-SCRIPT-DATA); return; } byte[] fileContents = uploadItem.get(); //TODO: add code to process file contents here. We will just printit. System.out.println(new String(fileContents)); response.getWriter().write(new String(fileContents)); } private FileItem getFileItem(HttpServletRequest request) { FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); try { System.out.println(request); List items = upload.parseRequest(request); System.out.println(FILE READ ###); Iterator it = items.iterator(); while (it.hasNext()) { FileItem item = (FileItem) it.next(); if (!item.isFormField() uploadFormElement.equals(item.getFieldName())) { return item; } } } catch (FileUploadException e) { return null; } return null; } } -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Java Applicaton and GWT Application talking to each other
Hello everybody, what I would like to have is a Java SWING Application that is showing some Information on google maps using the web-browser. So my idea now is, to setup a GWT Application based on the Google maps library that is talking to my java desktop application. Is this achievble? And yes - how can I connect both applications? Thanks for your support, Regards Uli -- 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 google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.