• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LinkedList Problems in JSP

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
I'm using JSP and MySQL for my project. I've successfully completed my project and uploaded into a remote server. But some codes are not working in the remote server and showing error. It was running very fine in my local network here.

The code which is giving problem is here


and outputting the values here


When i run this code in my local network it is running fine and giving me the correct output. When i run in the remote server it is giving me error like this


[ February 22, 2007: Message edited by: Bear Bibeault ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the differences between your local environment and the remote environment? Different VM? Different app server version?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg,
his other message has a bit more details :
http://www.coderanch.com/t/291467/JSP/java/LinkedList-Problems-JSP
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
Thanks for the reply, but i still have the same problem in my remote server. I think it is due to the JVM older version. The code I provided above is having any problem. How can i fix it in the older version of the JVM.

Please help me
thanks in advance

regards

Aravind Prasad
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object not support error

Is that the only error you get? Is there no stacktrace or anything? Please provide all the details.

My best guess at this point is that you have compiled your code with the 1.5 java compiler and are deploying into a 1.2 environment. That won't work. You could try the -target switch and tell it to target 1.2 when you compile (or use ant's javac target attribute) and that might help.
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Gregg Bolinger,
Thankyou for the reply. The error i'm getting is here. Please have a look and help me how to solve the problem

I highly doubt the problem coming is due to the JDK version.



Please help me to solve this..

Thanks in advance

regards

Aravind Prasad
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to recompile your project using the following options :
javac -source 1.2 -target 1.2
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Satao,
Thanks for the reply. But how can i do that in the remote server. in that server it the source is www.citytyres.com/aravind

How to do the recompilation?

regards

Aravind Prasad
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
he is aking you to compile it at the local machine ...& upload it

Am i right???
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But my file name is search.jsp.

How to compile it. I'm now in the path

C:\Apache Software Foundation\Tomcat 5.5\webapps\order\program\orderMgmt\status


How to comile the file search.jsp in jdk1.2 palatform .
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, as Kumar said, I mean "recompile on the local machine".
In your first post, you said : "I've successfully completed my project and uploaded into a remote server", so I suppose you have the sources. Try to recompile your project with the options I've posted above, and you'll see some compile errors.
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

But how to comile the files.
I've folders and files included in the main folder and i have to compile all the files and folders .

So how to do that..

Help me please

regards

Aravind
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your local environment is not suitable for the required development. You really should match the development version and release version to avoid that kind of troubles. You may have to make your container compile the JSP using version 1.2 too.
What IDE are you using for coding, and which web container ?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method add(Object) in the type LinkedList is not applicable for the arguments (double)
.

I'm guessing that you're using JDK 1.5 or higher on your local machine.

From the error message, it looks like you're trying to add a primitive type (double) to a Java collection (Linked List). Java collections can't handle primitives; they only handle objects. You will need to wrap the double type with Double.

Starting with Java 1.5 the JVM will do this for you. The feature is called autoboxing.

As mentioned earlier, you should download and install the versions of both Java and the container that you will be using on the server to your local development environment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic