Newsletter

Struts 2 Iterator Tag Example

Struts »on Oct 29, 2011 { 1 Comment } By Sivateja

Let us see how to use iterator tag in struts 2, actually iterator is the best tag to use rather writing while loop to print collection of objects in jsp’s.  if we use while loop we may need to write 4 - 5 lines but we can get the same result with iterator with 1 line hah.

Example

required files….

  • index.jsp
  • success.jsp
  • web.xml
  • struts.xml
  • LogingEx.java

Directory Structure

index.jsp

success.jsp

LogingEx.java

web.xml

struts.xml

Output

You Might Also Like

  ::. About the Author .::

Java4s_Author
- Full Stack Java/J2EE & UI Web Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

One Response to “Struts 2 Iterator Tag Example”
  1. man says:

    Hi,

    Is it possible to use only struts 2 taglibs for my JSP without using action class and filter dispatcher.

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Hibernate Spring Struts
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2018 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.