• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

Need help submitting an html form with java uploader on my website

 I am new to web programming.

What software I'm using
  I am using a java uploader so that my website users can upload large files to my server. I purchased a java uploader called "myuploader". It works fine. I am using php to submit the data to my server. I am being hosted by network solutions.  Here is a link to the java uploader on my website if you want to see it http://cowboyprint.com/myuploader/upload.html. I am using dreamweaver cs3 as my software.

Here is an example of the code for my java uploader
<applet name="uploadApplet" code="javaatwork.myuploader.UploadApplet.class"
   archive="myuploader-standard-signed-1.11.jar, labels.jar" width="400"  height="250">
   <param name="uploadURL" value="http://www.cowboyprint.com/htdocs/upload.php">
   <param name="successURL" value="http://www.cowboyprint.com/htdocs/result.html">

The problem

I also purchased a java applet to be able to submit html form data with the file upload. Here's the example code they provided to send the form.
1. myuploader-form-standard-v13.jar

- Put the jar file in the same directory as the jars of MyUploader.
- Put the jar in the applet tag.
- Add the "form" parameter to the applet tag.
- Fill in your form name.
- Add 'mayscript' at the end of the first line of the applet tag.


<applet name="uploadApplet" code="javaatwork.myuploader.UploadApplet.class"
   archive="myuploader-free-signed-v17.jar, myuploader-form-standard-v13.jar,
   labels.jar" width="400"  height="250" mayscript>
   <param name="uploadURL" value="http://www.mycompany.com/upload/upload.do">
   <param name="successURL" value="http://www.mycompany.com/upload/result.html">
   <param name="form" value="<your form name>">

I would like to be able to submit the users name, contact phone#, email, and company as text with the file that they upload. Can you please provide instructions and code on how I should do so?
  • 3
2 Solutions
Since this is an applet code, add query parameters to the url.
Then, in your landing page, where the applet actually posts the file, read it off from the query string.

http://www.mycompany.com/upload/upload.do?username=abc&formname=def etc...

Since its your applet that sends the data, and probably the applet does not expose a 'param' for you, the above should do the job for you
cowboyprintAuthor Commented:
Where exactly should I put the code?
In the applet tag, where you have the uploadURL param, modify it to
 <param name="uploadURL" value="http://www.mycompany.com/upload/upload.do?username=abc&formname=def ">

The additions to your url is in bold above.
When the URL is hit with the file, in your server application code that executes for this url hit(servlet/jsp/php etc.), you can get the query string.

have the above in a single line ignoring the wrap

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now