0
I want to remove first char from property tag in struts2 ex **<property value="name">** which display name #abhijit but I want to remove first char from that value.
我在字符串中添加了该字符串。 我想要传递该值作为请求参数,以获得所有与 匹配的记录。但由于该特殊字符,我不在动作类中创建值。 这里是动作类代码。如何从struts2属性标签中删除字符
HttpServletRequest request = (HttpServletRequest) ActionContext.getContext()
.get(ServletActionContext.HTTP_REQUEST);
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String tagname=request.getParameter("name");
System.out.println("tag to search:"+tagname);
在控制台
标签搜索:
http:// localhost:8080/project/result?name =#newone –