Frank Manno

Ranch Hand
+ Follow
since Apr 06, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Frank Manno

Hey All,
I'm very new to the Servlet side of Java programming... I'm taking a course and am trying to setup my development environment. I downloaded the WebLogic Workshop IDE, but was unable to get my Servlet running... I'm not sure if I'm missing something in the setup, but it was very daunting.
I've elected to go about doing this the right way... Writing my servlets, and manually configuring the server to run it. I've chosen Resin as my server, and have successfully run it.
My problem, however, is when I go to compile the Servlet, it notifies me that "javax.servlet.*" and "javax.servlet.http.*" do not exist. I've searched these forums, and come up with some previously discussed issues. Unfortunately, none were fixes for me.
Here's my system setup: I'm running J2SDK 1.4.1_03... I've searched my system, and have been unable to locate the needed "servlet.jar" file.
My question is this: _must_ I download the J2EE SDK, or can I continue with my current configuration, and install the servlet.jar file? Also, I've been unable to locate the "servlet.jar" file on Sun's site. I found this link, and mistakingly downloaded the Servlet specifications.
Any help would be appreciated on how to go about setting this up.

Thanks!
20 years ago
Hi James,
Thanks for responding... Can you elaborate a bit on your response. I think I know what you mean, but any further exlanation would be appreciated.
Thanks!
21 years ago
Hi all!
I'm running into a problem with multiple forms in my MIDlet. I have a form that displays items in a recordstore.
From that form, there is a menu with various commands including "Update" and "Add", which when pressed, display the Update and Add form respectively.
The problem I'm having is that I'm being thrown an "IllegalStateException" if I switch from the Main Form to "Add", back to the Main Form and then over to "Update".
Is there something I could be missing? I'm testing this on the emulator (if it makes a difference in debugging the problem).
Any help is appreciated!
Thanks,
Frank
21 years ago
Hey all,
Sorry for not responding sooner... I ended up going with a StringBuffer and just appended each character as I read it in. I'm not sure how efficient this is, but I'd appreciate any feedback on that issue.
I'd like to thank everybody who pitched in their help, including Jonathan Knudsen who also helped out!
I ended up finding out that the Apache server was sending the data back in 3 chunks. My professor was the one who found out, unfortunately, after I had already found a workaround.
It certainly provided me with some insight I would never have looked into had I not run into this problem.
Thanks again!
Frank
21 years ago

Originally posted by Lasse Koskela:
Ok. First of all, I'd suggest making the database query with XML-over-HTTP so you don't need to get a JDBC driver for MIDP. There are some tutorials for doing that kind of things around the web.


Lasse,
You brought up a good point. You mentioned using XML over HTTP (ie: SOAP or XML-RPC), however, in one of my courses (Mobile Java), our professor indicated that rather than transferring data via an XML format, you should consider using a script/servlet that runs on the server, and communicates with your service (ie: database, etc.). The script will then retrieve the results, and then simply return a string object to the MIDlet.
His main argument is that the MIDlet should process as little as possible. Although it does make sense, I'm not sure if I agree 100%, as there are solutions (ie: kXML-RPC/kXML) that allow for light-weight devices to handle XML transmissions.
What are your thoughts?
21 years ago
Michael,
Unfortunately, he doesn't... I assume because it's out of scope of the example/book.
That's what I was thinking as well, is that there may be something going on at the Servlet level. So that's a possibility?
Also, when I was searching through the forums for any already-existing problems, I ran across this thread (https://coderanch.com/t/226399/JME/Mobile/Wireless-connection-speed-ME-app). There's mention that the method Jonathan uses will only work _IF_ the server supports the "content-length" header. Can you confirm whether this is true?

Thanks again... I really appreciate it!
21 years ago
Michael,
Thanks for responding... What you say makes sense, and that's why I ended up trying it with the StringBuffer, and looping each time to read byte by byte. What I find so boggling is that Jonathan's method works perfect in his example:

That's the code right out of his Jargoneer MIDlet. Is there something I'm missing in my code that he has? It just doesn't make sense that his works and mine doesn't.
I appreciate any suggestions you may have!

Thanks again!
21 years ago
Hey all,
I've been working all day trying to figure this out. I'm working on a MIDlet that connects to a server, executes a CGI script, which connects to an Oracle database and returns a result based on a value entered into a textfield.
I'm basing the code off of Jonathan Knudsen's "Jargoneer.java" code (from his 2nd edition book). The odd part is that his code works without a hitch. The code I'm using, which is almost identical apart from variable names, fails.

The odd part is that if I use a StringBuffer to read the contents of the query's resultset, and then convert the Buffer into a String, all works fine:

Is there a reason why my code isn't working above?! Any help would be greatly appreciated!

Thanks!
21 years ago
Gang,
Would you mind posting some more of the code... I can't seem to pinpoint the problem... Also, be sure to enclose your code within "[ code ][ /code ]" blocks (be sure to remove the extra spacing between the words and the braces), so that it makes it easier to read it.
21 years ago

Originally posted by Michael Yuan:
Firmware upgrade is unlikely for cell phone type devices. In fact, Nokia 3650 already has a newer "replacement" model (Nokia 6600) that runs MIDP 2. Dirk, you did get that 3650 free on Amazon, right?


Michael,
Has the 6600 already been released (either in Europe in or North America)? If not, do you know when it's slated for availability?
I'm looking to purchase a J2ME-enabled phone, but I'd prefer a MIDP 2.0 phone, and so far the 6600 seems like the only cell phone that supports 2.0 (or am I wrong?).

Thanks,
Frank
21 years ago
Gang,
Unless I missed it in your code, why not use an actual Alert object to display the alert?
Once you create your Alert, you can display the Alert and then the Canvas like so:

See if that helps.
[ August 19, 2003: Message edited by: Frank Manno ]
21 years ago

Originally posted by Gang Lu:
Hi, Thank you for taking your time in advance.
I am working on MIDP project current. Basically, 3 thread are running: main MIDlet, animaion, Httpconnection. Animation class is a Canvas, I use showNotify() and hideNotify to control the animation image (i.e. start or stop the animation). When i click a menu, the request will be sent out and in the meantime, the animation canvas will show up with animation running to hide the network delay. Upon response from the server comming a Alert needed to show on screen replacing the animation. But it doesn't work, the anim canvas even does not be shown (which mean showNotify() never been called). if I comment the Alert, the anim canvas can work well.
what the problem, please give me some help! Any tricky way to do that?THanks a lot.


Can you paste the code that you use to call the canvas and the alert? It may help figure out the problem.
Also, what thread are you making the calls from?
21 years ago
Hey all,
I've been looking through the list of devices posted by Serge (by the way, thank you very much for the list), and it seems that most of these devices look to be Phone/PDA combos.
I'll be heading to Europe in September and would like to find a phone that supports MIDP 2.0 and has a built-in camera. So far, it seems that the Nokia 6600 is the only solution available.
Does anyone know of any other phones (not PDAs) that support MIDP2 and have cameras built-into them?
Any help on this is appreciated.

Thanks!
21 years ago
Is Nokia the only company offering MIDP2-enabled phones? I haven't been able to find any others. I figured Siemens would have had a couple out by now.
21 years ago
Hmmm... Very weird.
Which model ipaq do you have? I bought mine in NYC... so if it's on the new ipaqs, I would assume it's on mine... but like I said, I dont' recall seeing anything about it. I'll have to check when I get home tonight.
21 years ago