Java Reference
In-Depth Information
closeDate = df.parse(request.getParameter("closeDate"));
} catch(java.text.ParseException pe) {
System.out.println("Exception " + pe);
}
// create the new opportunity
Opportunity opp = new Opportunity(
request.getParameter("name"),
new
Double(request.getParameter("amount")).doubleValue(),
request.getParameter("stageName"),
new
Integer(request.getParameter("probability")).intValue(),
closeDate,
new
Integer(request.getParameter("orderNumber")).intValue(),
new Long(request.getParameter("accountId"))
);
// persist the entity
try {
pm.makePersistent(opp);
} finally {
pm.close();
}
response.sendRedirect("telesales?action=accountDisplay&accountId="+request.
getParameter("accountId"));
}
}
public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
doGet(request, response);
}
}
Search WWH ::




Custom Search