java中一个简单的调用问题
String str=(String)request.getParameter("sortId");
String str2=(String)chinese.toChinese(request.getParameter("bigSort"));
int id=Integer.parseInt(str);
CallHtml.callOnePage("newsAction.do?method=frontSelectSmallSortAction&sortId=?id?&bigSort===?str2?= ","", "", "html");
大家好!我想问这样一个问题:请看上面内容,我想把在上面定义好的str2和id附给CallHtml.callOnePage中的sortId和bigSort,请问如何赋值呢?谢谢!!
举个例子吧!加入str2=体育,id=10,则CallHtml.callOnePage("newsAction.do?method=frontSelectSmallSortAction&sortId=10&bigSort=体育 ","", "", "html");
------解决方案--------------------
这样就可以:
CallHtml.callOnePage("newsAction.do?method=frontSelectSmallSortAction&sortId="+id+"&bigSort="+str2 ,"", "", "html");