?
Solved

Having problem converting String to Long

Posted on 2007-11-29
3
Medium Priority
?
3,278 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 750 total points
ID: 20394972
hi,
try  this:

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

It will work...
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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