aspose file tools*
The moose likes Java in General and the fly likes Problem with recording in server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with recording in server" Watch "Problem with recording in server" New topic
Author

Problem with recording in server

jagadish Regonda
Greenhorn

Joined: Nov 02, 2006
Posts: 10
Hiii..
I developed a small web application for recording audio in server.
in my jsp two buttons called as Record and stop.whenever i clicked on record it will create a .wav file(what ever file ext.)in server(i.e where the server is running,currently am using tomcat)and it will record what ever i talk and stop it will stop
So my problem is i click on Record it will create a .wav file in server but it unable to record the voice in to tht file.

i done using temp.buffer it also unable to record and play the file

sample code



is there any problem with streaming with tomcat or in jsp is there any contenttype
jst suggest the help


thanks in advance
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
I hope i did not get you wrong!
you can not record sound trough a Browser (the JSP will be HTML on the client) unless you have some active code (maybe Active X, Flash, Applet ?).

The JSP is translated to a .javav file and this is translated to a .class file.
Upon request the JSP code is executed on the server and the output is sent to the client. Usually the output of the servlet is HTML, but you can also send other content types to the client.


pascal
[ November 02, 2006: Message edited by: pascal betz ]
jagadish Regonda
Greenhorn

Joined: Nov 02, 2006
Posts: 10
Tx,But from applet can we create a file in server and record the file
can any one suggest how to do
tx in advance
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
The first thing to do is to record the sound on the client (still, if i got you right). i never did sound recording with java...but i would try following:

- create a simple application that records /plays sound on the local machine, no web no server involved here.
- if this is working, try to convert it to an applet (probably includes signing the applet and required libs for accessing file system, sound resources).
- if this works make the applet send the data to a server. this is just bytes. and there is nothing restricting an applet communicating with the server it was loaded from (again, if you need to sign it anyway, then you can send the data to whereever you want if you get the permission from the user)


pascal
jagadish Regonda
Greenhorn

Joined: Nov 02, 2006
Posts: 10
Tx,i already done in applet it's working fine. but whenever i clicked on record it will create a file in server and store in to tht file
give me suggestions

tx in advance
 
 
subject: Problem with recording in server