Elías Turbay

Ranch Hand
+ Follow
since Oct 06, 2005
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 Elías Turbay

Tanks Paul.

Now I have this code, and it works fine...




But I need another thing and I don't know how to do it. For example:



And the result should be:

14 years ago
I tried to remove all the invalid escape sequences:



But when I do:



I get the following error:

14 years ago
Hi Sebastian

When I try to use it:



I get the following errors :

Multiple markers at this line
- Syntax error on tokens, delete these tokens
- Syntax error on tokens, delete these tokens
- Syntax error, insert "AssignmentOperator Expression" to complete
Expression
- Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
- Syntax error, insert ";" to complete BlockStatements
- Syntax error on tokens, delete these tokens
- The left-hand side of an assignment must be a variable

Can you help me with this?
14 years ago
Hi, sorry for my poor english

I need to replace any valid URL (Example: "https://coderanch.com") with an HTML link,

I searched all over the net and I could not find the way to go generic.

I understand that I have to use regular expressions, but I have no experience with them.

Thanks in advance
14 years ago
Hi, you need to convert your MIDlet first:

C:\Program Files (x86)\Research In Motion\BlackBerry JDE 4.6.0\bin>rapc import="C:\Program Files (x86)\Research In Motion\BlackBerry JDE 4.6.0\lib\net_rim_api.jar" codename="C:\BBMidlet" -midlet "C:\xxx.jad" "C:\xxx.jar"

You will get a file named "BBMidlet.cod" ... Then use the option "Load Java Program" from BB Emulator

That's all

If you want to emulate networking operations, you need to install the "BlackBerry Email and MDS Services Simulators 4.1.2" as well.

(Sorry for my poor English)
14 years ago
Hi John

I'm sure that the Servlet execution is successful for two reasons. First I have read all the Tomcat logs and there are no errors. Then I made an error handler Class that is called inside all catch instructions, and save the error to the database, but nothing is inserted. I have forced an error, and then I saw that the error handler class saved it correctly.

For the second question... I add another Servlet that does exactly the same but change the type of response to "text/html" and use PrintWriter to output the response to the Browser and the result is correct. I get the value 10

Thanks a lot for your help
14 years ago
Hi amit,

I cannot use your aproach 'cause the operations that the Servlet executes has multiple responses.
Response Code 200 represents a successful conexion, but after that, several operations that can return different values

Thanks for reply
14 years ago
Hi, sorry for my poor english

I have a very uncommon problem

My J2ME app communicates with a Tomcat Server (RPC pattern). I have only one Servlet that execute differents methods based on the operation requested by the MIDlet.

The MIME TYPE is set as response.setContentType("application/binary"); And I'm using DataInputStream and DataOutputStream in both sides

When the operation was successful, the Servlet send an int constant (public static final int opOK = 10;) to the device. The problem is that when the MIDlet does:
din.readInt() it doesn't read the value 10, it read this value: 1008813135

The server that have this behavior is a Linux Server (behind a Windows 2003 Server with a port fowarding configured at 8080 port). We try to solve this reinstalling the JDK with a newer and also reinstaling an older Tomcat, but nothing happens.

I ran the same Web app in other Server (Windows XP) of another company and everything goes well. In that case the portfowarding is configured in the ADSL router.

But I need this application to function correctly in the another environment

PLEASE HELP ME

Thanks in advance
14 years ago
You need to develop a MIDlet that communicates with a Servlet (running in Apache Tomcat) via HTTP.

Search the web, there are a lots of examples

Otherwise, buy "Developing Scalable Series 40 Applications". That book has an example of that (PhotoClient and PhotoServer)
14 years ago
Buy a book. Is the better way

The best I read was "Developing Scalable Series 40 Applications" (http://www.amazon.com/exec/obidos/ASIN/0321268636/mobileenterpr-20/)

Bye
14 years ago
Hi, sorry for my poor english

I have a very uncommon problem

My J2ME app communicates with a Tomcat Server (RPC pattern). I have only one Servlet that execute differents methods based on the operation requested by the MIDlet.

The MIME TYPE is set as response.setContentType("application/binary"); And I'm using DataInputStream and DataOutputStream in both sides

When the operation was successful, the Servlet send an int constant (public static final int opOK = 10;) to the device. The problem is that when the MIDlet does:
din.readInt() it doesn't read the value 10, it read this value: 1008813135

The server that have this behavior is a Linux Server (behind a Windows 2003 Server with a port fowarding configured at 8080 port). We try to solve this reinstalling the JDK with a newer and also reinstaling an older Tomcat, but nothing happens.

I ran the same Web app in other Server (Windows XP) of another company and everything goes well. In that case the portfowarding is configured in the ADSL router.

But I need this application to function correctly in the another environment

PLEASE HELP ME

Thanks in advance
14 years ago
Hi Alaa, if your site doesn't have a valid Certificate, there is no way to connect via HTTPS with MIDP2.
17 years ago
Hi

I don't have my code here...
But I know that you have to change the polish sources... And you must specify the dir where you have the new sources in the build.xml file
PolishDir="yourDir"

I think that you have to change the file "...\ui\ChoiceGroup.java"

Bye
18 years ago
Hi, I'm using J2ME Polish 1.2.4 to build and compile my project. I have no problems to compile, no errors are shown and the app works fine...
The only problem I have is what I mentioned before...

The new properties that I add to any class doesn't appear in the code completion popup, and that makes my work harder .... that's all...

PLEASEEEE HELP MEEEE !!!

Note: sorry for my poor english
18 years ago