So im trying to make a request from a rest jersey webservice, but since i want to pass a variable that has the "/" character im having trouble to reach my resource class method. Heres the url:
http://localhost:8030/IPDMS/rest/process/search/210/2010
Where the 210/2010 is a variable, so the "/" character will mess when searching the resource.
@Path("/process")
public class ProcessResource extends IPDMSWebServices{
int sizeList=1;
public ProcessResource(){
super();
}
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/search/{idprocessoent}")
public Processo searchProcesso(@PathParam("idprocessoent") String idproc){
try {
URLDecoder.decode(idproc.replace("!", "%"),"UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new Processo(idproc,"toma","haha","2000");
}
So i tried encoding but if i encode the variable, the "%" character is used and that doesnt seem to go well with the Rest webservice. I could replace the "%" character but i was trying to avoid that.....