servletÏòjspͬʱ´«¶à×é¾ßÓÐÏàͬ½á¹¹µÄÖµ
package com.dong;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class BuyerOrderServlet extends HttpServlet {
private static final long serialVersionUID = -3855206432313787833L;
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String[] order_id=new String[10];
String[] new_price=new String[10];
String[] product_number=new String[10];
HttpSession session = request.getSession(true);
response.setContentType("text/html;charset=utf-8");
String driver = "oracle.jdbc.driver.OracleDriver";
String url = "jdbc:oracle:thin:@127.0.0.1:1521:global";
String username = "scott";
String pass
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
ÐÂÊÖ:
tomcat+struts 2.0
jsp Ò³ÃæÖ±½Ó¹ØÁªmodel
ÏÖÔÚÐèÒª¸ù¾Ýmodel(admin)ÀïÃæµÄÒ»¸öitem(id),ÅжÏjspÒ³Ãæ³öÏÖµÄÄÚÈÝ.
´ó¸ÅÁ÷³Ì:
...
<table>
<tr>
<td>
<s:if admin.id is null> ......
ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
ÔÚjspÒ³ÃæÖÐÔõô»ñµÃStruts2ÔÚactionÖÐÅäÖõÄrequest¡£
ÎÒÔÚºǫ́µÄÅäÖÃÈçÏ£º
List list = new ArrayList();
list.add(users);
ActionContext ct= ActionContext.getContext();
HttpServletRequest requ ......
struts2 hibernate spring »¹ÓÐÆäËüµÄÂð£¬ÕâЩ¿ò¼ÜÊDz»ÊǶ¼ÊǹúÍâµÄ¸ßÊÖ ×Ô¼º¿ª·¢³öÀ´µÄÄØ£¿»¹ÊÇjsp ÔÀ´¾ÍÓеģ¿
WebWork,Wicket,JSF,Tapestry,Freemarker,ibatis,Luncene
×î³£ÓõľÍÊÇÕâÈý¸öÀ²
Íâ¹úÈ˵ļ¼Êõ± ......