📄 _orderadd.java
字号:
/*@lineinfo:filename=/orderAdd.jsp*/
/*@lineinfo:generated-code*/
import oracle.jsp.runtime.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import Flower.model.Orderlist;
import Flower.model.Ordermain;
import java.sql.*;
import Flower.model.DBConnect;
import Flower.model.shoppingCart;
public class _orderAdd extends com.orionserver.http.OrionHttpJspPage {
public final String _globalsClassName = null;
// ** Begin Declarations
// ** End Declarations
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {
response.setContentType( "text/html;charset=gb2312");
/* set up the intrinsic variables using the pageContext goober:
** session = HttpSession
** application = ServletContext
** out = JspWriter
** page = this
** config = ServletConfig
** all session/app beans declared in globals.jsa
*/
PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
// Note: this is not emitted if the session directive == false
HttpSession session = pageContext.getSession();
if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
pageContext.setAttribute(OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE);
JspFactory.getDefaultFactory().releasePageContext(pageContext);
return;
}
int __jsp_tag_starteval;
ServletContext application = pageContext.getServletContext();
JspWriter out = pageContext.getOut();
_orderAdd page = this;
ServletConfig config = pageContext.getServletConfig();
try {
// global beans
// end global beans
out.write(__oracle_jsp_text[0]);
/*@lineinfo:translated-code*//*@lineinfo:2^1*/ Flower.model.shoppingCartBean cart;
synchronized (session) {
if ((cart = (Flower.model.shoppingCartBean) pageContext.getAttribute( "cart", PageContext.SESSION_SCOPE)) == null) {
cart = (Flower.model.shoppingCartBean) new Flower.model.shoppingCartBean();
pageContext.setAttribute( "cart", cart, PageContext.SESSION_SCOPE);
}
}
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[1]);
out.write(__oracle_jsp_text[2]);
out.write(__oracle_jsp_text[3]);
out.write(__oracle_jsp_text[4]);
out.write(__oracle_jsp_text[5]);
out.write(__oracle_jsp_text[6]);
out.write(__oracle_jsp_text[7]);
/*@lineinfo:user-code*//*@lineinfo:246^19*/ Connection con=null; PreparedStatement pstmt=null; ResultSet rs=null; con=DBConnect.getConnection(); pstmt=con.prepareStatement("select * from OrderMain order by orderid asc"); rs=pstmt.executeQuery(); String str=null; while(rs.next()) { str=rs.getString(1).trim(); } if(str!=null) { str=str.substring(2); int num=Integer.parseInt(str)+1; str="OR"+String.valueOf(num);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[8]);
/*@lineinfo:user-code*//*@lineinfo:265^21*/ out.print( str);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[9]);
/*@lineinfo:user-code*//*@lineinfo:267^62*/ out.print(str);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[10]);
/*@lineinfo:user-code*//*@lineinfo:268^19*/ } else { str="OR1";
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[11]);
/*@lineinfo:user-code*//*@lineinfo:275^21*/ out.print( str);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[12]);
/*@lineinfo:user-code*//*@lineinfo:276^64*/ out.print(str);
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[13]);
/*@lineinfo:user-code*//*@lineinfo:278^19*/ } java.util.Date d=new java.util.Date(); String str1=String.valueOf(d.getYear()+1900)+"-"; str1=str1+String.valueOf(d.getMonth())+"-"; str1=str1+String.valueOf(d.getDate()+1); int num1=0;
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[14]);
/*@lineinfo:user-code*//*@lineinfo:291^21*/ out.print( session.getAttribute("identity"));
/*@lineinfo:generated-code*/
out.write(__oracle_jsp_text[15]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -