This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!

Parka Teoh

Ranch Hand
+ Follow
since Aug 28, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Parka Teoh

Ok. Solved.

I declared it to be a String eariler up in the JSP page. That's why.
17 years ago
Below is the error.

insertOrder(int,java.lang.String,java.lang.String,long) in limited.ProcessBean2 cannot be applied to (int,java.lang.String,java.lang.String,java.lang.String)
processBean.insertOrder( uniqueOrderID, name, address, creditCardNumber);


In, there's a method accepting the parameters (int, String, String, long).

Does it mean that my ( uniqueOrderID, name, address, creditCardNumber) is actually (int, String, String, String)?
17 years ago

When I included the public infront of the empty constructor, it still couldn't work.

But when I deleted the constructor away, it's able to work again.

Oh my!! It works now!
17 years ago

I have the following tags in my JSP.

<jsp:useBean id="cart" scope="session" class="limited.CartBean" />
<jsp:useBean id="idBean" scope="page" class="limited.GetOrderIDBean" />
<jsp:useBean id="databean" scope="page" class="limited.InsertDataBean" />

Only the third failed to compiled.

Nothing's looking wrong.....or is there...

17 years ago
I'm sorry if I posted this in the wrong forum.

Here's my problem...
I have a javaBean that writes stuff to the database to be saved.
It works fine when I use a testing Class to invoke the bean's method to write some dummy variables.

When I deployed it on a JSP page, I received the following error.

"org.apache.jasper.JasperException: /checkout.jsp(4,0) The value for the useBean class attribute limited.InsertDataBean is invalid.

I should think my bean met the bean requirements. But I can't find out what's wrong. Any help would be really really really great..

Here's my insertDataBean code

17 years ago
Thanks guys!! Thanks a lot!!!
17 years ago
I have a class containing a private array. (as below)

How can I display all the items in another class by invoking the getMyArray() method?
17 years ago
Let's say I have a getter method.

What is the difference between a return and a return()?

[ October 19, 2004: Message edited by: Parka Teoh ]
17 years ago
Oh okay, solved. THanks to all who replied.

I had to instantiate Pack1 as an object inside Pack2.

Man, fundamentals.
17 years ago
Hey thanks a lot!!!

I have created a constructor to read the values into the array.

Another problem came up, though.

This file is in a package.

When I use another file to reference the array index myDouble[0] and print out using the command prompt, the result was 0.0, instead of the 21.2 I read it into the first file ( in this case)

Here's my other file called

17 years ago
I create the simplest array and it doesn't work...

Here's the java file with the array code

It gives me the following error message..

D:\webapp_proj2\WEB-INF\classes\limited\ ']' expected
myDouble[0] = 21.2;
D:\webapp_proj2\WEB-INF\classes\limited\ <identifier> expected
myDouble[0] = 21.2;

I'm lost.
17 years ago
I've tried System.out.println in the connection file too. And the queries were printed out correctly. I have 9 items, and all the 9 items were displayed.

But somehow when I run the other java file to reference the array from the connection file, it returns null.


17 years ago
I have an array in a jdbc class file.
But I can't reference it in another class file in the same package.

Here's my jdbc connection class code

and further down (in the same file )I have

in another file called, I tried to reference the array in the above file using the following...

I've got null printed.

I don't know what I've missed...

[ October 17, 2004: Message edited by: Parka Teoh ]
[ October 17, 2004: Message edited by: Parka Teoh ]
17 years ago
The service method is not empty. And I've put the servlet in the correct package in the correct class.

I've also repackaged the servlet. But still doesn't work.

I got the code from a textbook's CD, so can't think of what other things that could go wrong.

Here's the code.

17 years ago
I noticed that sometimes my IMAGE button doesn't appear.

Is it a bug?
17 years ago