Hi all,
This is a part of JSP i am developing: Based on user input the array arguments for the java class below differs.
In the above JSP file, i am calling a java class called SOEfile, which actually creates a file called "temp.html" . The java class does lot of file processing, basically it takes input as a array of text files and read each of the files and write them all together in the temp.html.
After that I need to include that temp.html created by the java class in my JSP page. Only after the temp.html is written down fully , it has to be included. The problem is , the JSP shows up the temp.html with old contents in it. It doesn't show up the temp.html with the latest content, if press the submit button the first time, it shows old contents, if i keep pressing it like 3, 4 times, now since the temp.html is written with the new contents, it shows up correctly.
Is there anyway to wait till the actual file is created and then only include it? I think whats happening is : the JSP calls the java class, since the java class is doing lot of file processing, the JSP includes the old temp.html instead of waiting till the file is written down correctly.
Do i need to use threads here? Please let me know how to do this.
Thanks,
Priyha