wood burning stoves 2.0*
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
Author

Custom JSP Tag

Khsitiz sharma
Greenhorn

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
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
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.


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

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Custom JSP Tag