I use this code to get integer from the http:
this.id =
Integer.parseInt(FacesContext.getCurrentInstance().
getExternalContext().getRequestParameterMap().get("id"));
Now I need to get String from the http. Can you tell me how I can do this? In Netbeans I tested this code:
this.id =
String.parseString(FacesContext.getCurrentInstance().
getExternalContext().getRequestParameterMap().get("id"));
But I get an error. Can you tell me what is the proper way to do this?
P.S The error in Netbeans:
cannot find symbol
symbol: method parseString(java.lang.String)
location: class java.lang.String
Integer.parseInttakes a String as a parameter. So you just need:As you don’t need to parse a String to get a String (as your compiler is telling you).