Question

This is the first time I am working with struts (1.2)

In my jsp page I have a form, user needs to provide IP address and filename, once he submit the page, this data is passed on to a web service which does connection to the device and collects data in the given file name.

Now the problem is, when I submit the page using the button after a while(around 1-2 minutes on IExplorer and 4-5 minutes on firefox) my application page disappear's; I don't see any error's in my application logs or weblogic logs.

This is a synchronous request and user had to wait on the UI/webpage for the final result display which takes around 30-40 minutes below is the snippet from the struts-config.xml

    <action 
        path="/Collect"
        type="com.aqura.project.struts.fileMgt.CollectResultAction"
        validate="false">
          <forward name="Collect" 
                   path="/jsp/collect.jsp"/>
    </action> 

    <action
        path="/CollectDisplay"
        type="com.aqura.project.struts.fileMgt.CollectResultAction"
        name="collectForm"
        scope="request"
        validate="true"
        input="/jsp/collect.jsp">
          <exception
              key="exception.prodconn.error"
              type="com.aqura.project.service.prodConnect.ProductConnectException"
              path="/jsp/ctError.jsp" />
          <forward name="FileTransferDisplay"
                   path="/jsp/fileTransferDisplay.jsp" 
                   redirect="true"/>
          <forward name="FileResolve" 
                   path="/FileResolve.do" 
                   redirect="true"/>
    </action>

collect.jsp is the jsp file for this operation and user has to wait on this page until we get a file successfully, once file is recieved we will check if it exist and needs to be renamed otherwise it will stored in user a/c.

logic is written on CollectResultAction.java, where we have action mapped.

I have been struggling with this issue for the past one week, and not able to make anything out.

I tried to put some logs on the JSP using <%c:out /> but that also didn't work. I am not sure how to debug this issue. Any help would be appreciated.

Another Update: I have added html refresh tag in the .jsp file, with this change now on FireFox page stays till final result is displayed, but on IE I am still seeing this issue, I have tried with IE6 and IE8.

Was it helpful?

Solution 2

Thanks JB Nizet, for your help. I tried by adding refresh every minute by this I was able to solve the issue on FireFox and it started working, however, My application has lots of dependency on IE and I was still seeing the same issue on IE.

after spending lot of time on this issue, I have finally found the solution the problem is with IE, and you need to reset IE back to factory settings here's how

In the menu Bar (if your menu bar is missing right click on the tool bar near the Home icon on iE7) click on internet tools, advanced option.....and at the bottom you will see RESET INTERNET EXPLORER . Go ahead and hit that button and your misery (hopefully) will end. My internet explorer started laoding all pages thereafter.

I found this solution @ http://www.techsupportforum.com/forums/f56/internet-explorer-not-loading-pages-but-firefox-is-69617.html

Thanks for all the help.

OTHER TIPS

You're probably hitting some browser timeout. Putting debug in the JSP doesn't make sense, since your action forwards to the JSP after 30 or 40 minutes. This way of doing is not user-friendly, and makes the browser and the server keep an open connection for a too long time. That could be the reason why you observe this behavior.

You should start the long process in the background, and immediately send a response telling the user that the work is in progress. Have this page refresh itself every minute, or trigger an ajax request every minute, to know if the process has ended or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top