like file object with path like c://tomcat//work//catelina//....//xyz.tmp
and content = text / ...
and fileName = sss.txt (actual file name)
now problem is
I need to pass this file object to next action that is
From this action i have to go to other jsp ( collect some text )and then i have to go to the next action and submit these values to db.
1. so i have tried to save the same path c://tomcat//work//catelina//....//xyz.tmpand tried to send to other action & create new file object , but observed that when the first action get completes the "c://tomcat//work//catelina//....//xyz.tmp" gets deleted
CAN any one tell me how to handle this....
1. how can i get actual path of the file (c://xfolder//yfolder//sss.txt)
2. or is there any way to save the .tmp file till i complete my operations in action that is inserting values in DB.
3. or any way i can pass the file object created in one action to other action through JSP.
4. if i have to save this file into new location then where we have to save (in the tomcat...).
The upload interceptor deletes the file after the action is completed. If you need it copied somewhere else, just copy it.
You could use a dynamic result (see here and here for details) to pass the filename to another action, but that shouldn't be necessary--whatever logic is handling the file should be abstracted out of individual actions into a service-like object that can be used anywhere.