javascript - Jump to background garbled code problem through href attribute of a tag
滿天的星座
滿天的星座 2017-06-12 09:19:51
0
2
849

Jump to the background garbled problem through the a tag href attribute. I tried request.setCharacterEncoding("UTF-8"); setting, but it didn't work.

Page code

<p class="extra">
    <a target="_blank" href="Qtitle/findTypeTitle?title_type=${qtype.title_type}">查看更多>></a>
</p>

Backend code

@RequestMapping("/findTypeTitle")
public String findTypeTitle(Model model,String title_type) throws UnsupportedEncodingException{
    request.setCharacterEncoding("UTF-8");
    //response.setContentType("text/html; charset=utf-8");//也实现不了
    System.out.println(request.getParameter("title_type"));//输出
    qtListType3=qtbiz.findTypeTitle(request.getParameter("title_type"));

    request.getSession().setAttribute("qtListType3", qtListType3);

    
    return "problem-more";
    
}

I would like to ask if there are any other ways to implement it and solve the problem of garbled characters

滿天的星座
滿天的星座

reply all(2)
女神的闺蜜爱上我

Does title_type contain Chinese?
Refer to [WEB] url path contains Chinese and form get request contains Chinese

阿神

Need to transcode Chinese

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!