Re: how to image.setUrl to ("public/images/2341.gif");
I can't tell you what your problem is exactly, but I CAN tell you allowing your upload servlet to have write access to your applications live deployment folder leaves your whole site about 60 seconds from being totally 0wN3d. Not to mention a new WAR deploy might wipe out everything you uploaded. Save the images somewhere else. --~--~-~--~~~---~--~~ 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: how to image.setUrl to ("public/images/2341.gif");
Thank you. I have uploaded an image:1232202393156.jpg to directory:src..client/ public/images,and then in method onSubmitComplete(),I set POJO object:model.setUrl("images/1232202393156.jpg"),and create an Images object:new Image(model.getUrl()),add this image object to RootPanel,but got this error: [TRACE] Request 13: http://localhost:/com.tsolution.emc.ImageUploaderTest/images/1232202393156.jpg [TRACE] The development shell servlet received a request for 'images/ 1232202393156.jpg' in module 'com.tsolution.emc.ImageUploaderTest.gwt.xml' [WARN] Resource not found: images/1232202393156.jpg; (could a file be missing from the public path or a tag misconfigured in module com.tsolution.emc.ImageUploaderTest.gwt.xml ?) then I copy this url:http://localhost:/ com.tsolution.emc.ImageUploaderTest/images/1232202393156.jpg,paste to address bar,got HTTP 404 error, and then I refresh(in host model) ,upload another image:2345.jpg,got some erros as above,but the stange is:I still copy previous url:http:// localhost:/com.tsolution.emc.ImageUploaderTest/images/ 1232202393156.jpg,it work now,that is,I can access previous uploaded image. Can anybody tell me what problem is? On Jan 17, 12:00 am, eggsy84 wrote: > Use the GWT Image object in your client side code: > > http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g... > > com.google.gwt.user.client.ui.Image img = new Image("images/ > myImage.jpg"); > > or > > img.setUrl("images/myImage.jpg); > > As long as the image is within your public/images folder it should > work just fine. > > Eggsy > > On Jan 16, 3:01 pm, Alex Luya wrote: > > > For testing,I uploaded an image into direcotry:src/../client/public/ > > images(servlet will do that),and created an image object and call > > setUrl() method to set url,so the question is how I can get and > > specify this url(src/../client/public/images/) in client side.thank > > you. --~--~-~--~~~---~--~~ 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: how to image.setUrl to ("public/images/2341.gif");
Use the GWT Image object in your client side code: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html com.google.gwt.user.client.ui.Image img = new Image("images/ myImage.jpg"); or img.setUrl("images/myImage.jpg); As long as the image is within your public/images folder it should work just fine. Eggsy On Jan 16, 3:01 pm, Alex Luya wrote: > For testing,I uploaded an image into direcotry:src/../client/public/ > images(servlet will do that),and created an image object and call > setUrl() method to set url,so the question is how I can get and > specify this url(src/../client/public/images/) in client side.thank > you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
how to image.setUrl to ("public/images/2341.gif");
For testing,I uploaded an image into direcotry:src/../client/public/ images(servlet will do that),and created an image object and call setUrl() method to set url,so the question is how I can get and specify this url(src/../client/public/images/) in client side.thank you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---