【发布时间】:2013-04-01 14:44:27
【问题描述】:
我有一个 RESTful Java Web 服务,它接受一个带有“#”的长字符串。
当我在调用时尝试将字符串发送到方法时,字符串在 '#' 处被拆分,我可以单独检索 [0] 值。
发送前消息是完好的,但是使用后这个..
req.open("GET","https://localhost:8443/registername/resources/registerName/"+"My#Name", true);
req.send();
是问题所在。
这些是 Web 服务中的前几行...
@GET
@Path("/{message}")
public String validateName(@PathParam("message") String message) throws Exception{
System.out.println(message);
...}
而且,它单独显示“我的”。
谁能帮我解释为什么会这样?谢谢!
【问题讨论】:
标签: java web-services rest get jersey