Hi, I am writing a file upload application in which I have to restrict the users to upload only upto 2MB file size. I am using struts upload(struts 1.1version) for uploading. The form from which I upload contains some fileds like date, time and some other details, which are filled at the time of loading the page using a method in the dispatchaction. When I click the upload button, i'll be calling the other method(let uplaod) in the same action class(Dispatch action class). I have a file upload limit of 2mb. When the user tries to upload file of size greater than 2mb, in the validate, error will be generated and will be fwd to the page specified by input tag in the action mapping tag(generally). But in my case that page to which it will be forwarded should execute an action upon loading. So, when I am giving the complete action path, the page is not forwarded. But its reamining the validate method(found it using system.out.println). For this i have used the redirect =true in the forward tag and in the controller tage inputforward=true. Now i am getting the page from which i am uploading the file by executing the action. But the errors are not displayed, which should be displayed. I have used the <html:errors> tag in the html page. Is it happening due to the redirect?. if so how to get that errors in the input page. Please suggest me..
<controller inputForward="true" maxFileSize="2M"/> <action path="/pages/Dmodule/BCInsert" input="insertBCSuccess" type="DModule.BC.BCAction" name="bcform" scope="request" parameter="eventcall" validate="true"> <forward name="getBC1" path="/pages/DModule/BC.jsp"/> <forward name="insertBCSuccess" path="/pages/DModule/BCInsert.do?eventcall=getBC" redirect="true"/> getBC is the method which is executed from the dispatch action when the page loads. -- B.Sridhar