Iterate over Collection in Struts using <logic:iterate>

Struts <logic:iterate> The tag can be used to iterate over collections, enumerations, arrays, or iterators. Here are the steps to use <logic:iterate> tag: 1.Create the Iterable object We can create any of the above mentioned iterable objects. For this example, lets create a List of Employee objects in the action class. Employee emp1 = new […]

How to use <bean:write> tag in Struts 1

Struts <bean:write> <bean:write> tag retrieves a value from a JavaBean and writes it to the web page being generated. Here are the complete list of properties of the bean:write tag : name Name of the JavaBean to retrieve scope The scope in which to look for the JavaBean. Valid values include page, request, and session. […]

Struts 1 Form validation using ActionForm’s validate() method

In this article, we will display a login form to the user to provide userid and password and validate them using ActionForm’s validate() method to display any validation errors on the input page. For this, we will be modifying the Hello World application we created earlier. You can refer details on the same here : […]

Struts Hello World Example using Maven and Eclipse

In this article, we will create a simple Hello World web application using Struts and we will deploy it on Tomcat server. We can create a Struts application by manually configuring it. For this, we can create a web application in eclipse and download the struts jars from http://struts.apache.org/download.cgi and add them in the project […]

Missing src/main/java in Maven project in Eclipse

When you create a Web application using Maven and import it in Eclipse, you may not see src/main/java folder in the Project or Package Explorer.   You can fix it using the following steps : Step 1: Right click on the Maven Project, select Build Path and then Configure Build Path Step 2: In Order […]