javascript - Retaining form values while moving back to parent jsp -


i have jsp, parent.jsp. has submit option calls action class. parent.jsp has list, drop down, text boxes. has 1 link 'upload file' add attachments, , submit button well.user selects/enters values in dropdown, list box , clicks on 'upload file'.

now when user clicks on 'upload file', opens small window browse option. user can select file on local system using browse button upload it. uploadfile.jsp has 'ok' option when click on 'ok' takes me parent.jsp. now, time, want show list of added files on parent.jsp. also, want populate parent.jsp values user has selected.

how do this?

when you're uploading file, have access name of files. can save name of file in session scoped variable follows:

session.setattribute("filenamevar", "nameoffileuploaded"); 

you can display in parent.jsp follows(i'm using jstl):

<c:out value="${"filenamevar"}" /> 

Comments