wood burning stoves
The moose likes JSP and the fly likes Custom JSP Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom JSP Tag" Watch "Custom JSP Tag" New topic

Custom JSP Tag

Khsitiz sharma

Joined: Jun 03, 2008
Posts: 7
Hi all!

I'm new to java development environment and I want to know how to create a custom jsp tag which iterate over the collection it contains.
for example let us suppose that we have a HashMap<String,Student> lhashMap.
Here Student is a java bean class which have name,rollno and marks attributes.

what I want is a tag which iterates over the HashMap

Please help me
thanks in advance
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Hi Khsitiz sharma,
Welcome to JavaRanch. Unfortunately, the Cattle Drive doesn't have any assignments about custom jsp tag creation, so I'm going to move your question to the Jsp forum.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Do you want to do this as an academic exercise or do you just want the tag?

If you just want the tag, look at JSTL's c:forEach tag.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link: http://aspose.com/file-tools
subject: Custom JSP Tag
It's not a secret anymore!