File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes how to do Long.parseLong() in JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to do Long.parseLong() in JSTL" Watch "how to do Long.parseLong() in JSTL" New topic

how to do Long.parseLong() in JSTL

Shilpa Tendulkar
Ranch Hand

Joined: Jul 29, 2001
Posts: 75

How do I use Long.parseLong(hex_val,16) using JSTL without custom tags?

It give me compile error stating...
The function parseLong() must be use with a prefix when a default namespace is not specified

Has anyone have tried like this before? Please help!

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

EL is not the same as scriptlets.
You can't put Java code in them.

If you have some processing that requires parameters to be parsed into longs, this should be done someone other than in the view tier (before context is passed to the JSP).

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: how to do Long.parseLong() in JSTL
It's not a secret anymore!