My page.jsp has some html div tags inside, switching div's display to block or none as the user clicks on a corresponding anchor tag buttons.
Let's say user clicks 2nd anchor button link, approriate div having html form loads in.. There I have a file upload browse button, using interceptor below, restricting upload limit maxsize and content type:
<interceptor-ref name="fileUpload">
<param name="maximumSize">15728640</param>
<param name="allowedTypes">application/pdf</param>
</interceptor-ref>
Then in java class extending ActionSupport, getting return type as input if in case of violation of maxsize and content type.
SO In struts.xml I defined
<result name="input"> page.jsp </result>
But this causes page.jsp to reload, not maintaining the same html div state, i.e 2nd form of div tag,which again one has to go and click on 2nd anchor tag button, thus loading file browse form.
Rather than Keeping
<s:fielderror> </s:fielderror>
inside of file browse form of second div tag, I can keep it at start of a body tag to display returned error message.
But I want user inputs like 'file browse path' to stay in the input fields, and error messages shows above the fields. If I can convince myself to display error messages on another jsp page, there wouldn't be so much trouble. But just to speculate, is it possible to achieve what I desired?