Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem with recording in server

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I child proofed my house but they still get in. Distract them with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic