Having problem converting String to Long

Posted on 2007-11-29
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)}.


<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"/>


Open in new window

Question by:royalcyber
LVL 20

Expert Comment

ID: 20384650
Check the value of orderObject to ensure that you're passing a proper value

Expert Comment

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

Long.parseLong((String) orderObject)

Accepted Solution

cypher_punk earned 250 total points
ID: 20394972
try  this:

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

It will work...

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 67
eclipse compiler vs Installed JREs option 3 77
recursion example 16 111
java 8 lambda expresssions exception handling 3 75
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

920 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now