The exception is as follows:
Can not find a java. Io. inputstream with the name [downloadfile] in the invocation stack. Check the <Param name = "inputname"> tag specified for this action.
1. If the file path is incorrect, no file is obtained. In this case, you can put the statement for inputstream in system. out. output in println (). If it is null, the path is incorrect, or the file is not found if it is accurate. 2. no get method for the attribute following "<Param name =" inputname ">" in the configuration file is written in the action. if both of the preceding conditions are correct, the problem is as follows: Return servletactioncontext. getservletcontext (). getresourceasstream ("... ") to obtain the input stream, ensure that the file is located in the servletcontext, that is, in the current application context. If you want to obtain an external file, such as a file in drive D, you must create an input stream on your own, for example: File file = new file ("D: // spring.doc"); </P> <p> inputstream is = new fileinputstream (File ); </P> <p> return is;Then OK !!