pass html request to java class

Hi.

I'm building an sms based jukebox for my sophomore project in computer science.

Things have been going well till now.

The basic project is this:

I have an sms gateway on the server side (pc). I'm using kannel open source sms gateway on cygwin. The pc is linked to a gsm mobile via a RS232 data cable. There is a media player (mp3) on the server side as well.

BASIC FUNCTIONALITY

A request sent by a user (using a gsm mobile) is receied by server via the gateway. Request is basically a predefined code for a song.

The gateway sends a html request to the server.

PROBLEM POINT

I cannot get the html request from the mobile gateway to be passed to the mp3 player.

PLEASE HELP?

Sincerely,

Ken

[789 byte] By [Ken.Mwendaa] at [2007-10-2 20:35:22]
# 1
And what is your actual question?
dcmintera at 2007-7-13 23:18:34 > top of Java-index,Java Essentials,Java Programming...
# 2
Oh, I left that out:How can I get the HTML request to the media player?
Ken.Mwendaa at 2007-7-13 23:18:34 > top of Java-index,Java Essentials,Java Programming...
# 3
:huh:OK, so the MP3 player is includes a webserver than can be used to control it?java.net.URL
mlka at 2007-7-13 23:18:34 > top of Java-index,Java Essentials,Java Programming...
# 4

Not quite.

The music player is a stand-alone software. What I think I'm trying to do is write a servelet for servicing the http request sent by the gateway. This should be done by playing the requested song, or returning details of a playing song (by sms) to the client.

Forgive me if I confuse you. Java is new to me and its proving rather tricky.

Please help?

Ken.Mwendaa at 2007-7-13 23:18:34 > top of Java-index,Java Essentials,Java Programming...
# 5
That's it! Sorry guys, I was asking the question in the wrong way. I meant http request and not HTML.
Ken.Mwendaa at 2007-7-13 23:18:34 > top of Java-index,Java Essentials,Java Programming...
# 6
Ahh, in that case:1) Find some good tutorials on Servlets/JSP2) Find out how you can control the MP3 player.
mlka at 2007-7-13 23:18:35 > top of Java-index,Java Essentials,Java Programming...
# 7
Is it possible to have the servelets work on getting information from a database and foward to the sms gateway? I'd like for the system to be able to reply to user requests by sms.
Ken.Mwendaa at 2007-7-13 23:18:35 > top of Java-index,Java Essentials,Java Programming...
# 8

> Is it possible to have the servelets work on getting

> information from a database

Yes, it's pretty easy. You will need to learn how to use the Java DataBase Connection (JDBC) API, and you may want to learn how to use a DataSource to supply the connectivity.

> and foward to the sms

> gateway?

Assuming that the gateway translates web requests into SMS messages and vice-versa (there is no standard Java thing for doing this) then yes, it will be possible. How you do that's between you and the gateway vendor, though.

> I'd like for the system to be able to reply

> to user requests by sms.

If your gateway supports it, you can do it. Probably you want to create an HttpConnection object to aid you in this. But I recommend writing the incoming controls before you worry about the outgoing controls.

dcmintera at 2007-7-13 23:18:35 > top of Java-index,Java Essentials,Java Programming...
# 9
Thank you very very much. I have learnt so much from you over these 2 weeks, it's unbelievable! Makes me wonder why I had not done this earlier. I will make sure to inform you on my progress.Goodday!
Ken.Mwendaa at 2007-7-13 23:18:35 > top of Java-index,Java Essentials,Java Programming...