Solved

Having problem converting String to Long

Posted on 2007-11-29
3
3,266 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

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