alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (editPerson.jsp)

This example Struts source code file (editPerson.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

create, create, first, first, last, list, name, name, persons, save, save

The Struts editPerson.jsp source code

<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
<head>
    <title>Edit Persons (batch-edit)
</head>

<body>
<s:form action="editPerson" theme="simple" validate="false">

    <table>
        <tr>
            <th>ID
            <th>First Name
            <th>Last Name
        </tr>
        <s:iterator var="p" value="persons">
            <tr>
                <td>
                    <s:property value="%{id}" />
                </td>
                <td>
                    <s:textfield label="First Name" name="persons(%{id}).name" value="%{name}" theme="simple" />
                </td>
                <td>
                    <s:textfield label="Last Name" name="persons(%{id}).lastName" value="%{lastName}" theme="simple"/>
                </td>
            </tr>
        </s:iterator>
    </table>

    <s:submit method="save" value="Save all persons"/>
</s:form>

<ul>
    <li>Create a new person
    <li>List all people
</ul>

</body>
</html>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts editPerson.jsp source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.