You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by "Richard Lin (7Seals.com)" <rl...@7seals.com> on 2000/09/30 08:25:51 UTC

Please help, Problem of loading pages

Hi Guys,

I am using iPlanet4.1/Tomcat3.1 on Solaris 2.8/NT4.

In one of my JSP page, A.jsp using <jsp:include page="B.jsp?..."
flush="true"/>.
I have encountered a JSP 500 error (unable rename...) report for A.jsp when
more than one concurrent users hit the page. (B.jsp is a full html page and
is a form for use to submit to database)
Surely most of time seems ok. I am wondering if it is a bug?

I've also checked the tomcat's Compiler.java

    public boolean compile()
        throws FileNotFoundException, JasperException, Exception
    {
.........................
        if (!classFile.equals(classFileName)) {
            File classFileObject = new File(classFile);
            File myClassFileObject = new File(classFileName);
            if (myClassFileObject.exists())
                myClassFileObject.delete();
            if (classFileObject.renameTo(myClassFileObject) == false)
                throw new
JasperException(Constants.getString("jsp.error.unable.rename",
                                                              new Object[]


classFileObject,

myClassFileObject
                                                              }));
        }
..........................
    }
Looks like when the 1st user hit the page while generating Servlet, the next
user came in and flush the Servile and recompile another one. So the 1st
user got an error.
Don't you need to synchronize something for the embed B.jsp? when using
'include jsp page flush="true"'.
If the embedded page is html, it seems ok. More test is required.

I believe Tomcat is capable of handling concurrent hits right?

Please help!

Cheers,

Richard