jsp:include in a sql:transaction
I have got a jsp "1.jsp" which will insert records in various tables. I'm using sql:transaction tag to group the sql statements together to provide transactional behavior. Some of these sql statements will be used by multiple jsps.
So I created a separate jsp "Common.jsp" which contains the sql statements which will be common for multiple jsps.
Heres how the code for 1.jsp looks like
INSERT INTO TABLE1
INSERT INTO TABLE2
<jsp:include page="Common.jsp" />
and heres how the code for Common.jsp looks like
But Sql Statements in Common.jsp fails because it expects a DataSource name.
INSERT INTO TABLE3
INSERT INTO TABLE4
I want to execute all these statements as part of 1 transaction. Can anyone suggests me a way to have a separate jsp which will include the common sql statements and still be part of transaction in 1.jsp .