jsp 向jquery grid url 传值

wenwen1 发布于 2012/09/12 14:03
阅读 829
收藏 0
response.setHeader("Refresh","1; URL=appPeople.jsp?Project_ID="+aid);我已经知道Project_ID=99,
然后我在appPeople.jsp中String Project_ID = request.getParameter("Project_ID");接着在appPeople.jsp里面的url调用:../json/getappPeople.jsp,我就在json中的getappPeople.jsp中 int id = 0;
    if(request.getParameter("Project_ID")!=null&&!"".equals(request.getParameter("Project_ID")))
    {id = Integer.parseInt(request.getParameter("Project_ID"));为什么id还是等于0?
我的appPeople.jspd的代码如下:
<%@ page language="java" import="java.util.*" import="java.sql.*" contentType="text/html;charset=UTF-8" pageEncoding="utf-8"%>
<jsp:useBean id="dbConn" class="pack_convert.DBConnXmgl"/>
<%@ page session="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> 
<%
request.setCharacterEncoding("utf-8");//处理乱码
String Project_ID = request.getParameter("Project_ID");
%>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>成员信息</title>
    <link rel="stylesheet" type="text/css" href="../../jquery/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../jquery/themes/icon.css">
    <script language="javascript" type="text/javascript" src="../../jquery/js/jquery-1.4.2.js"></script>
    <script type="text/javascript" src="../../jquery/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="../../jquery/js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../jquery/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../js/appPeople.js"> </script>
   </head> 
  <body>
  <table id="appPeople">
  </table>
 <% session.setAttribute("Project_ID",Project_ID); %>
  </body>
</html>

json中getappPeople.jsp如下:
<%@ page language="java" import="java.util.*" import="java.sql.*" pageEncoding="utf-8"%>
<jsp:useBean id="dbConn" class="pack_convert.DBConnXmgl"/>
<jsp:useBean id="promanagement" class="net.gvsun.database.ProManagement"></jsp:useBean>
<%@ page session="true" %>
    <%
    int id = 0;
    if(request.getParameter("Project_ID")!=null&&!"".equals(request.getParameter("Project_ID")))
    {id = Integer.parseInt(request.getParameter("Project_ID")); }
    String re=promanagement.getappPeople(id);
    out.print(re);
     %>

加载中
返回顶部
顶部