You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.5 KiB
66 lines
2.5 KiB
/************************************************************************************************* |
|
* 프로그램명 : HttpAssign.java 프로그램설명 : 보고자 이관 요청에 대한 정보 작성자 : 작성일 : 변경일 : |
|
**************************************************************************************************/ |
|
|
|
package kr.co.kihyun.beans.batch; |
|
|
|
import java.io.IOException; |
|
import java.io.PrintWriter; |
|
|
|
import javax.jdo.PersistenceManager; |
|
import javax.jdo.Transaction; |
|
import javax.servlet.ServletException; |
|
import javax.servlet.annotation.WebServlet; |
|
import javax.servlet.http.HttpServlet; |
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import kr.co.kihyun.beans.entity.util.MPersistenceManager; |
|
import kr.co.kihyun.beans.entity.util.*; |
|
import kr.co.kihyun.moumi.MoumiConfig; |
|
import kr.co.kihyun.text.html.ServletUtil; |
|
|
|
import org.slf4j.Logger; |
|
import org.slf4j.LoggerFactory; |
|
@WebServlet("/servlet/kr.co.kihyun.beans.batch.SetNote") |
|
public class SetNote extends HttpServlet { |
|
|
|
private static final long serialVersionUID = 1L; |
|
private static final Logger LOG = LoggerFactory.getLogger(SetNote.class); |
|
String assignInfo = ""; |
|
|
|
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { |
|
|
|
//44.적절하지 않은 예외처리(광범위예외클래스)_CWE-754 : Update by YOUNGJUN,CHO |
|
Transaction tx = null; |
|
PrintWriter out = null; |
|
PersistenceManager pm = null; |
|
|
|
try { |
|
out = res.getWriter(); |
|
pm = new MPersistenceManager(PMF.get().getPersistenceManager()); |
|
tx = pm.currentTransaction(); |
|
|
|
int count = 0; |
|
UpdateNote et = new UpdateNote(); |
|
|
|
tx.begin(); |
|
et.updateNote(req, res); |
|
tx.commit(); |
|
} catch (IOException ioex) { |
|
out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.reConfirmation"))); |
|
out.println(ServletUtil.getJavaScript("parent.close();")); |
|
ioex.printStackTrace(); |
|
} catch (Exception ex) { |
|
out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.reConfirmation"))); |
|
out.println(ServletUtil.getJavaScript("parent.close();")); |
|
ex.printStackTrace(); |
|
} finally { |
|
if (tx.isActive()) |
|
tx.rollback(); |
|
pm.close(); |
|
} |
|
//================================================ |
|
} |
|
} |
|
|
|
|