我要实现的功能是,查询指定时间段内数据的信息,将查询的询信息显示在一个jsp页面中。
相关代码:
……
String strURL = "http://168.88.1.3:8888/querybyduration.jsp?ID=20100701&20100715" ;
Runtime.getRuntime().exec("cmd /c start " + strFile );IE可以下正常打开,可是地址栏上却是:http://168.88.1.3:8888/querybyduration.jsp?ID=20100701 
后面的&20100715不见了,这是怎么回事儿呢???

解决方案 »

  1.   

    Desktop.browse 试试这个方法。
      

  2.   

    &是两个参数之间的分隔符,你确定没有写错么?
      

  3.   

    String strURL = "http://168.88.1.3:8888/querybyduration.jsp?ID1=20100701&ID2=20100715" ;
      

  4.   

    是 & 符号的问题,应该采取类似转义的处理么?也你是很清楚~~~学习下~~~
      

  5.   

    你是通过get方式提交数据的。get方式是通过地址栏传递参数的。get方式传递多个参数用&符号进行分隔。例如:String name="yellow"   String password="123456"
    get方式提交的话就是 url="http://.......?name="+name+"&password="+password;然后再跳转的页面用
    request.getParameter("name");
    request.getParameter("password");
      

  6.   

    &转义为%25  使用encodeURI 或者 encodeURIComponent
      

  7.   

    是不是可以换成&试一试,这个问题没有见过
      

  8.   

    &是命令的特殊字符,这样就可以了:
    String strURL = "http://168.88.1.3:8888/querybyduration.jsp?ID=20100701\"&\"20100715" ;
    Runtime.getRuntime().exec("cmd /c start " + strURL  );