Get all updates of Java4s
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

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.
What would you like to learn today?
Browse these popular technologies
Spring-Boot-tutorials Hibernate tutorials Spring tutorials Struts tutorials Servlets tutorials Ajax tutorials Log4j tutorials jQuery tutorials Json tutorials Core Java tutorials Web Services tutorials AngularJs tutorials
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Contact | About Us | Privacy Policy | Advertise With Us

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