-set success result to go to jsp file instead of redirect to 'upload' action
-clear the form fields before returning to jsp page after upload
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@661582
13f79535-47bb-0310-9956-
ffa450edef68
return INPUT;
}
+ private void reset()
+ {
+ // reset the fields so the form is clear when
+ // the action returns to the jsp page
+ groupId = "";
+ artifactId = "";
+ version = "";
+ packaging = "";
+ classifier = "";
+ artifactFile = null;
+ artifactContentType = "";
+ artifactFilename = "";
+ pomFile = null;
+ pomContentType = "";
+ pomFilename = "";
+ repositoryId = "";
+ generatePom = false;
+ }
+
public String doUpload()
{
try
//TODO: MRM-810 (this writes to archiva.log, should be audit.log)
getLogger().info( msg + " by " + getPrincipal() );
-
- //TODO: MRM-785 (success message does not display on web page)
+
addActionMessage( msg );
+ reset();
return SUCCESS;
}
catch ( RepositoryNotFoundException re )
<action name="upload" class="uploadAction" method="input">
<result name="input">/WEB-INF/jsp/upload.jsp</result>
<result name="error">/WEB-INF/jsp/upload.jsp</result>
- <result name="success" type="redirect-action">upload</result>
+ <result name="success">/WEB-INF/jsp/upload.jsp</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
<interceptor-ref name="fileUpload"/>
</action>