Solved

Having problem converting String to Long

Posted on 2007-11-29
3
3,253 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
[X]
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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

726 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