The error msg is: Servelet error:An exception occured. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.

Here i hav to enable trace. i have passed sid= database name, sid_number, serial#,flag; Pls help me and put it in most common words as i'm new to all this.

03-22-2012, 11:15 AM

Tolls

Re: Error in jsp

That's easy.
Don't do this in a JSP page.
This is entirely servlet based code, with the database stuff in a DataAccessObject called by the servlet.
The servlet then does the forwarding.

That would, of course, also include getting rid of those database related JSPs.
This is something of an abuse of JSPs, which should only really be used for displaying the results of processing done by servlets.

03-22-2012, 11:15 AM

dinesh.guntha

Re: Error in jsp

Connection conn1 = dbts.getConnection();
Connection conn2 = getDatabaseConnection(conn1,sid); //connection2 is reffering the connection1 object .
conn1.close(); // your are closing the conn1 and executing the statments so that the exception will occure.
Dont close the conn1 until conn2 execution if finished.

03-22-2012, 11:51 AM

Tolls

Re: Error in jsp

How do you know what is going on inside the getDatabaseConnection() method?
There's no code up there showing what is happening in there.
conn1 and conn2 may be completely unrelated.

03-22-2012, 12:09 PM

dinesh.guntha

Re: Error in jsp

Instanced of creating the new object they are using the existing connection object instance only. As normal we use.
this may be one case. Their may chance any another cases to occur a problem .
If he prints the getDatabaseConnection class then it will more clear to clarify the problem.

03-22-2012, 12:26 PM

Tolls

Re: Error in jsp

Then I would question what on earth the point is of this code.
Why create a connection from another connection like this?

Then again, until they sort out where they are doing this code and move it to where it belongs (out of the JSP entirely) I have little intention of looking further into it.