<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Welcome to my world. &#187; AS3</title>
	<atom:link href="http://www.marceble.com/tag/as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marceble.com</link>
	<description>Marc E. Eble</description>
	<lastBuildDate>Thu, 22 Apr 2010 20:47:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Uploading Files Using Flash and Java</title>
		<link>http://www.marceble.com/2009/11/uploading-files-using-flash-and-java/</link>
		<comments>http://www.marceble.com/2009/11/uploading-files-using-flash-and-java/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 23:02:59 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[JAVA]]></category>

		<guid isPermaLink="false">http://www.marceble.com/?p=210</guid>
		<description><![CDATA[The sample code attached below is a complete example for uploading multiple files using flash cs3 and java. After much searching I could not find a complete Flash File uploading tutorial that utilized java; most if not all are for php. This flash interface provides progress for each file independently, and upon completion can notify [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />The sample code attached below is a complete example for uploading multiple files using flash cs3 and java. After much searching I could not find a complete Flash File uploading tutorial that utilized java; most if not all are for php. This flash interface provides progress for each file independently, and upon completion can notify a javascript function. The files are sent to a simple JAVA servlet where they are saved to the local file system.</p>
<p><img class="alignnone" title="FlashUploadExample" src="http://www.marceble.com/downloads/FlashUploadExample/flashuploadexample.jpg" alt="" width="528" height="176" /></p>
<p>For the java servlet there are two library requirements:<br />
<strong> commons-fileupload-1.2.1.jar<br />
commons-io-1.3.2.jar</strong></p>
<p>They are included in the <strong>web/WEB-INF/lib</strong> folder. The source files are saved as a Netbeans 6.7 project with Glassfish set as the target server. It is simple to open the project and change the target server. Both the compiled flash and source file are in the <strong>web </strong>folder.</p>
<p>I extracted two settings to variables listed in the index.html file so that this could be used without recompiling/editing the flash file. The first variable <em>url</em> is the address of the java servlet to send the files to. The second variable is <em>f </em> and is the name of the javascript function to call when each file is uploaded. <em>f</em> is optional. These variables need to be set 3 times in the <strong>index.html</strong> file. See the file for further documentation.</p>
<p>I expect to update the source code slightly over the next couple weeks. I will replace the zip file with the latest as updates are completed.</p>
<p><a  href="http://www.marceble.com/downloads/FlashUploadExample/FlashUploadExample.zip"><span style="text-decoration: none;"><strong>source files</strong></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marceble.com/2009/11/uploading-files-using-flash-and-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

