View Full Version : can't convert url to swf
cmcginnis
10-20-2003, 04:35 PM
I'm trying to pull a jpg into my laszlo application using the setSource( url ) method. I am able to bring the url up in another browser and see the image, but with then application I get the following error:
- can't convert url to SWF: mark/reset not supported
- com.laszlosystems.data.ConversionException: mark/reset not supported
- Responding with error SWF: mark/reset not supported
Any ideas why this would be happening?
Thanks
whisperstorm
10-20-2003, 09:49 PM
I'm doing something similar so perhaps I can help -
Are you using a relative url or an absolute? I think there is a bug in setSource() that requires you to use an absolute URL.
if you set that image statically (not loading, hard coded) does it load?
Can you post some code that shows the error?
antun
10-21-2003, 08:09 AM
The mark/reset issue you're seeing is caused when the servlet tries to (incorrectly) guess the mime type of the resource that you're trying to load.
This is a known issue, and will be fixed in the next release, however in the meantime there are a couple of workarounds that you can try:
First of all, verify that the jpg is not corrupt in some way - make a copy of it on your LPS server, and try loading it (both at runtime over HTTP, as well as at compiletime).
Next see what headers the back-end that you're using is returning when you ask for the image. This will be really easy with Proxomitron. Hit the image using your browser (just like you described in your post). For example, the header graphic on the Laszlo home page returns this:
http://www.laszlosystems.com/img/h_head_texture_lzx.jpg
+++RESP 4943+++
HTTP/1.1 200 OK
Date: Tue, 21 Oct 2003 16:06:06 GMT
Server: Apache/2.0.44 (Unix) mod_ssl/2.0.44 OpenSSL/0.9.6b DAV/2 PHP/4.3.0 mod_jk/1.2.1
Last-Modified: Fri, 10 Oct 2003 22:50:31 GMT
ETag: "13b7f4-2e32-1e41bc0"
Accept-Ranges: bytes
Content-Length: 11826
Content-Type: image/jpeg
+++CLOSE 4943+++
Notice how the Content-Type header specifies that it's an image? If you get some other value, this might be causing it.
Is the image publically deployed where I can see it?
Also, could you tell me what servlet container you're using?
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.