0

My query has two parts:
1. Can I pass an audio file from one jsp to another using form submit.
2. If yes, then how do I write this file to another file in the next jsp page.

I was going through the AudioInputstream class but couldnt make much head-through.

Any help will be much appreciated.

Cheers,
Moonis

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by moonis.ahmed
0

>Can I pass an audio file from one jsp to another using form submit.
>If yes, then how do I write this file to another file in the next jsp page.

JSP - Java Server Pages are servlets and they are compiled and executed (managed) by the web container (application server). A servlet is a server-side java program that runs in response to an HTTP request. The role of a servlet is to accept requests from the client, invoke the appropriate application logic to fullfill the request, and returns the results to the client.

So, I don't think you need to copy a file. If you want to play this audio file at client; use object or embed html tags.

0

Ok. let's put it this way. Suppose i have main.jsp where I select a file. (input type=file) and submit this form to process.jsp. I want to know, how to retrieve the file on process.jsp. Will request. getParameter work here?

0

To upload a file, html form tag must be look like this.

<form action="upload.jsp"
  method="post" enctype="multipart/form-data">
  Select a file: 
  <input type="file" name="first" />
  <br />
  <input type="submit" name="button" value="upload" />
</form>

http://commons.apache.org/fileupload/

SUMMARY:The Commons FileUpload package makes it easy to add robust, high-performance, file upload capability to your servlets and web applications.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.