Question

I am trying to make a file upload that will accept multiple files using the stripes framework. I have a single file upload working. I am trying to understand the Documentation for multiple file upload.

According to the doc, all I need to do is modify single file example to:

<stripes:form>
    <c:forEach ... varStatus="loop">
        ...
        <stripes:file name="newAttachments[${loop.index}]"/>
        ...
    </stripes:form>

ActionBean

private List<FileBean> newAttachments;

public List<FileBean> getNewAttachments() {
    return this.newAttachments;
}

public void setNewAttachment(List<FileBean> newAttachments) {
    this.newAttachments = newAttachments;
}

What do I need to replace the ...(in particular, the one in the forEach loop) with to get this example working? Thanks.

Was it helpful?

Solution

Probably that should work: <c:forEach begin="1" end="3" varStatus="loop">

see Tag forEach doc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top