“搜索中文时,因为要把搜索的关键字 一直放在请求中。假如搜索的中文关键字是: "客 "
代码如下:
items= "${page.totalCount} "
url= "${ ctx }/infopush.do "
index= "center "
maxPageItems= "3 "
maxIndexPages= "10 "
isOffset= " "
export= "pageOffset,currentPageNumber=pageNumber "
scope= "request ">
<pg:param name= "method " value= "infoTopicSearchAjax "/>
<pg:param name= "best " value= "${ best } "/>
<pg:param name= "category " value= "${ category } "/>
<pg:param name= "keyword " value= "${ keyword } "/> <!--在页面里直接输出${keyword },输出的是“客”-->
<pg:index>
<jsp:include page= "/common/pagination/simple_ajax.jsp " flush= "true "/>
</pg:index>
</pg:pager>
当搜索的结果超过1页时,当点其它页(比如第2页),查看了下源代码如下:
2
可以看到keyword的值不为“客”了,变成了“%BF%CD”。
当在后台String keyword = (String)request.getParameter( "keyword "); keyword的值不是“%BF%CD”,而是乱码: "?¨ª " ,不知道其中原因。谢谢”有人知道怎么解决吗