Win a copy of Terraform in Action this week in the Cloud forum!

Lakshya Sethi

Greenhorn
+ Follow
since Feb 22, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lakshya Sethi



This is javascript bookmarklet to download youtube videos.
Can anyone explain me this in brief ?

I have little knowledge of javascript.

Thank you!
How to check if a web page is synchronized on a local server in JSP ?
I have tried to make database updation synchronized in jsp but how can i check it on local web server (tomcat) ?
I have used Oracle database.

I am kinda new with JSP so explain in little detail.

Thank you

More Info:

Class.forName("oracle.jdbc.driver.OracleDriver");

Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","username","password");

balance=balance-1500;


String query1= "update bank set bal=? where card_no='"+cnumber+"'";
PreparedStatement st1 = con.prepareStatement(query1);

st1.setString(1,String.valueOf(balance));

int qresult1 = st1.executeUpdate();

This is some of the code in which I have not applied any synchronization.
In simple words, I want to know how to test if synchronization part is really working or not ?

My main motive is... I am trying to make an admission form and I want a limited number of seats but I want after every registration process my database updates the seat numbers accordingly and show the right information about how many seats are left to the user. (though in the given code i am just changing the balance)
If is there any other way please help me ?

Like in this example
<%!
PreparedStatement pst = con.prepareStatement("query");
%>
synchronization
<%
synchronized(pst)
{
pst.setXXX(...);
pst.setXXX(...);
pst.executeXXX(...);
}
%>
7 years ago
JSP