Glenn Castro

Ranch Hand
+ Follow
since Aug 24, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Glenn Castro

Originally posted by Jesus Angeles:
im curious, i dont know anything about j2me....all those mobile phones that can do java, use j2me?



Not all, if you're phone has a Symbian OS, you can use C++ aside from j2me(if it has midp).
[ April 03, 2006: Message edited by: Glenn Castro ]
17 years ago
Go for J2EE. I was once a J2ME Developer but I think my java career would not be complete if I have not taken the J2EE path. There's so much to learn in J2EE and lots of opportunities than J2ME.
17 years ago
I think HFSJ is a nice book. I learned and apply most of the recommendations in the book at work. I'm also preparing for scwcd and it is my only reviewer at this time.

Originally posted by Billy Tsai:
do the developers need the technical capabilities in low level languages such as assembly, C, C++ and OS concepts in addion to J2ME to be able to write mobile phone softwares for phones such as nokia, motorola, xcute, benq etc....
?



Well, I think it's not that necessary unless you are developing application which J2ME API does not address.

Originally posted by amit bathla:
hi friends
i want to learn java servlets tell me good books,
time it will take to learn
and any other additional information
bye



Head First Servlets & JSP is a good reference as well as a reviewer for SCWCD. I learned a lot of concepts including the lifecycle of a Servlet.
18 years ago
At last, I passed SCJP 1.4. I used K&B book. One month preparation.
18 years ago
I'm running the example taken from
http://java.sun.com/j2se/1.3/docs/guide/rmi/getstart.doc.html#5238

After running the rmiregistry, I tried to run the server by typing the following at the command prompt:

java -classpath . -Djava.rmi.server.codebase="file:///d:/getStart" examples.hello.HelloImpl

Then I got this exception:

java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: examples.hello.HelloImpl_Stub

How can I solve this problem?
18 years ago
When I run your code, I encountered the following warning:

Running with storage root DefaultColorPhone
Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler.

So I tried to change some code and make it run the connection in a separate thread. The address, http://64.28.105.110/servlets/webyu/Chapter7Servlet?request=gettimestamp, returns 404 Not Found. But if I tried to change the address into http://www.google.com it runs fine.
18 years ago
Check your url. Your url must be the location where your server application is running.
18 years ago
I'm using xml in my midp application. Which is better to use, kxml or nanoxml? Or are there any other parser which I can easily learn and apply?
I have a GoF's Design Pattern book but the problem is, I can't absorb fully what is written in that book. Maybe because examples are not written in Java. And I guess experienced (c++) programmers are the one who will benefit from it.

After reading the table of contents and the sample chapter of HFDP, I am decided to get a copy of this book. Just like the Head First Java, it's fun and learning is easy.

Thank to the authors of this book. I hope to get a copy from a local store here in the Philippines.
Hi all,

Well, to avoid the problems of having IllegalStateException, I created new connection in every request and close it afterwards. I checked the Protocol class in the com.sun.midp.io.j2me.http package and I think that HttpConnection is designed that way (opens the connection -> send request -> getresponse -> close the connection). Once a request is sent, it sets the requestFinished (on the Protocol class) variable to true, thus throws an IllegalStateException.

Just a suggestion: Use one connection per request. Avoid reusing connection/keep alive connection.

Hope that it helped you guys!
[ November 10, 2004: Message edited by: Glenn Castro ]
19 years ago
I already solved the problem
19 years ago
Is it possible to use one HttpConnection for sending multiple request, in other words, the connection is always alive?

In my application, I can send my login request. The succeeding request displays this exception:

java.lang.IllegalStateException: Write attempted after request finished
at com.sun.midp.io.j2me.http.Protocol.writeBytes(+16)
at com.sun.midp.io.BaseOutputStream.write(+52)
at java.io.OutputStream.write(+8)
19 years ago