This sort of thing is hardly ever done in JSP/Servlets on websites. What you need is a merchant account with a bank so that they handle the processing. What you would do is make some sort of backend call to their servers. For small sites often use other payment collectors such as 2checkout.com
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.