Programming JSP/WML/J2ME/Java Question

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
have a program to do for a class. Simply put, I wanna reuse code I've already written and just append this program to what I've already got.

I'm grabbing a MovieList Object (created dynamically from an Oracle server) using a java controller and using it as a bean in a jsp.
If someone with a "Mozilla Compatible" browser enters in the URL command, he/she will be taken to an dynamically created HTML webpage, displaying the movies.
If someone uses a WML Browser (phone, pda browser [NOT stupid microIE cause that ID's as IE5 :| ] ) it will send them to a dynamically created WML page, displaying the movies and using a small WMLscript to vote for one.

I have this implemented as a simply If/Else in the JSP.
<% if( the browser == Mozilla){
........
}
else{
........
} %>

So you can see my "default" case (were it a switch) is to assume the user is using a WML browser. (Because the WML browsers aren't exactly consistent in regard to identifying)

Now I want to add another case (or "else if") for when someone connects using a J2ME (Java Micro Edition) program from a PDA. In this case, the JSP will send back a dynamically created XML doc for parsing and dislaying.

However, I'm not sure what to use for this case. The program obviously won't have a browser header for identification, and (AFAIK) WML browsers are inconsistent.

Does anyone know of any other test for WML browsers that I could use so that I can make the default case send out the XML to the java program?
Or any other tricks would be helpful (i.e. letting me know how to created a "false" broswer header to send out to the jsp)

thx for anyhelp.

[edit]I'm posting here 'cause nobody's alive in the programming forum[/edit]