Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Having problem converting String to Long

Posted on 2007-11-29
3
3,250 Views
Last Modified: 2013-11-24
I am setting a property in a useBean
and I need to convert String to Long

but get the following exception

JSPG0122E: Unable to parse EL function ${Long.parseLong(orderObject)}.

      at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateElFunction(ValidateVisitor.java:1298)

<wcbase:useBean id="orderShippingModeList" classname="com.allenedmonds.commerce.order.beans.OrderShippingModeListDataBean">
	<c:set target="${orderShippingModeList}" property="orderId" value="${Long.parseLong(orderObject)}"/>
	<c:set target="${orderShippingModeList}" property="calculateShippingCharge" value="true"/>
	<c:set target="${orderShippingModeList}" property="calculateShippingAdjustment" value="true"/>
	<c:set target="${orderShippingModeList}" property="resolveFulfillmentCenter" value="false"/>
</wcbase:useBean>

Open in new window

0
Comment
Question by:royalcyber
3 Comments
 
LVL 20

Expert Comment

by:gatorvip
ID: 20384650
Check the value of orderObject to ensure that you're passing a proper value
0
 
LVL 8

Expert Comment

by:mhunts
ID: 20394004
You need to cast to String, as in

Long.parseLong((String) orderObject)
0
 
LVL 1

Accepted Solution

by:
cypher_punk earned 250 total points
ID: 20394972
hi,
try  this:

String str;
Long l;
l = Long.parseLong(str);

It will work...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 106
Custom Java Application connects to database: Which one of the 20? 4 35
jsp insert to database example 2 43
Setup GlassFish 4 21
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question