我使用此代码从 http 获取整数:
this.id =
Integer.parseInt(FacesContext.getCurrentInstance().
getExternalContext().getRequestParameterMap().get("id"));
现在我需要从 http 中获取字符串。你能告诉我我该怎么做吗?在 Netbeans 中,我测试了这段代码:
this.id =
String.parseString(FacesContext.getCurrentInstance().
getExternalContext().getRequestParameterMap().get("id"));
但我得到一个错误。你能告诉我这样做的正确方法是什么吗?
PS Netbeans 中的错误:
cannot find symbol
symbol: method parseString(java.lang.String)
location: class java.lang.String