比如a.jsp?id=10
我怎么在a.jsp中得到id的值??感谢

解决方案 »

  1.   

    request.getParameter()我用这个怎么得不到呢??晕了
      

  2.   

    <%
    int cf_type=request.getParameter("cf_type").trim();%>
      

  3.   

    上面传的是ID,这里为什么是cf_type呢?
      

  4.   

    这个ID中的值应该是传过去的吧.你的a.jsp是不是新弹出来的页面?
      

  5.   

    是不是用的sendredirect(a.jsp?id=10)这个方法
      

  6.   

    如果是:<a href="a.jsp?id=10">转到</a>用 request.getParameter("id");应该可以得到参数
    如果是表单提交 看看 浏览器安全设置是否禁止表单提交了?
      

  7.   

    如果是的话..应该会触发一个js程序,然后弹出你的a.jsp页面并将ID=10的值得到,
    <%
    String StrCurrPageNum = request.getParameter("ID");
    %>js中
    ID应该是你在页面取到的值;
    function openNew(){
    window.open("a.jsp?id="+ID);
    }
      

  8.   

    js function   MM_jumpMenu(targ,selObj,restore){   //v3.0
          eval(targ+".location='"+"?cf_type="+selObj.options[selObj.selectedIndex].value+"'");
          if   (restore)   selObj.selectedIndex=0;
      } <select name="cf_type" id="cf_type" onChange="MM_jumpMenu('parent',this,0)">

            触发js的select <%        for(int i=0;i<allCer.size();i++){
            Certificates allCerinfo = (Certificates)allCer.elementAt(i);
            int cerid=allCerinfo.getCf_type();
            %>
            <option value="<%=cerid%>"><%=allCerinfo.getCf_name()%></option>
            <%
              }
            %>
          </select>
      

  9.   

    有这么复杂哇。?传过来的request.getParameter("参数名字")就可以了 阿,不要int,String可以的
      

  10.   

    始终出现以下错误:
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
      

  11.   

    你的a.jsp放到哪里的,jsp中正常的路径应该是/jsp/a.jsp?id=''这样的,404错误就是找不到页面路径的问题