dept_process.jsp
来自「This project mainly deals with automatin」· JSP 代码 · 共 45 行
JSP
45 行
<%@page import="java.util.*,java.rmi.*,java.sql.*, javax.ejb.*,javax.naming.*,packIC.*" %>
<%! int sno,deptno,ret; %>
<%! String deptname,location,depthead ;%>
<%
System.out.println("In DeptProcess: ");
sno=Integer.parseInt(request.getParameter("sno"));
deptno=Integer.parseInt(request.getParameter("deptno"));
deptname=request.getParameter("deptname");
location=request.getParameter("location");
depthead=request.getParameter("depthead");
try{
Hashtable ht=new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
InitialContext Context = new InitialContext(ht);
SesHome home=null;
home = (SesHome)Context.lookup("packIC.SesHome");
SesRemote remote=home.create();
ret =remote.createDepartments( sno, deptno, deptname, location, depthead);
if(ret==111)
{
response.sendRedirect("./LoginError.jsp");
}
else{
response.sendRedirect("./Succ_Dept.jsp");
}
}
catch(Exception e)
{
System.out.println(e);
}
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?