📄 createconceptstr.jsp
字号:
<%@ page language="java" %><%@ page import="javax.naming.InitialContext" %><%@ page import="org.impact.stars.conceptmd.conceptstr.ejb.ConceptstrLocal" %><%@ page import="org.impact.stars.conceptmd.conceptstr.ejb.ConceptstrLocalHome" %> <html><head><title>Constainer-Managed Persistence Demo</title></head><body bgcolor="white"><center><h2>Container-Managed Persistence Demo</h2>Create a new conceptstr:<p><form method="post" action="/stars/createConceptstr.jsp"><table border=10> <tr> <td>ConceptstrID: </td> <td><input type="text" name="ConceptstrID" size="11" value=""></td> </tr> <tr> <td>Name: </td> <td><input type="text" name="Name" size="25" value=""></td> </tr> <tr> <td>ProjectID: </td> <td><input type="text" name="ProjectID" size="25" value=""></td> </tr> <tr> <td>Description: </td> <td><input type="text" name="Description" size="25" value=""></td> </tr></table><p><input type="submit" name="submit" value="Submit"><p></form><%String conceptstrID = request.getParameter("ConceptstrID");String name = request.getParameter("Name");String projectID = request.getParameter("ProjectID");String description = request.getParameter("Description");if (conceptstrID != null && !"".equals(conceptstrID)) { try { InitialContext ic = new InitialContext(); Object o = ic.lookup("java:comp/env/ejb/concept/Conceptstr"); ConceptstrLocalHome home = (ConceptstrLocalHome) o; ConceptstrLocal conceptstr = home.create(conceptstrID, name, projectID, description);%>New conceptstr: <a href = "/conceptstr/editConceptstr.jsp?conceptstrID=<%=conceptstrID%>"><%=conceptstr.getName()%>, <%=conceptstr.getProjectID()%>,<%=conceptstr.getDescription()%></a>created. </p><a href = "/conceptstr/searchConceptstr.jsp">SEARCH</a></p><% } catch(Exception e) { e.printStackTrace(); out.println("Create new conceptstr FAILED : " + e.toString()); }}%><hr>[<a href="/conceptstr/index.html">HOME</a>]</center></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -