Skip to main content
edited tags
Link
Paul Samsotha
  • 209.8k
  • 39
  • 503
  • 756

Hi I've been checking lots of posts already but I havent found the problem that's happening with me. My PathParam always is null, can anyone tell me what might be the issue

Imports in interface: import javax.servlet.http.HttpServletRequest; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType;

import javax.servlet.http.HttpServletRequest; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; 

Interface:

@RequestMapping(value="/unhash/{hash}", method = RequestMethod.GET) @Produces({ MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ResponseBody Token decryptToken(@PathParam("hash") String token, HttpServletRequest request) throws APIException; 

And the implementation:

@Override public Token decryptToken(String token, HttpServletRequest request) throws APIException { 

I seen nothing strange here, it's working fine for queryparams. Any ideas? I am of confuse.

Hi I've been checking lots of posts already but I havent found the problem that's happening with me. My PathParam always is null, can anyone tell me what might be the issue

Imports in interface: import javax.servlet.http.HttpServletRequest; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType;

Interface:

@RequestMapping(value="/unhash/{hash}", method = RequestMethod.GET) @Produces({ MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ResponseBody Token decryptToken(@PathParam("hash") String token, HttpServletRequest request) throws APIException; 

And the implementation:

@Override public Token decryptToken(String token, HttpServletRequest request) throws APIException { 

I seen nothing strange here, it's working fine for queryparams. Any ideas? I am of confuse.

Hi I've been checking lots of posts already but I havent found the problem that's happening with me. My PathParam always is null, can anyone tell me what might be the issue

Imports in interface:

import javax.servlet.http.HttpServletRequest; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; 

Interface:

@RequestMapping(value="/unhash/{hash}", method = RequestMethod.GET) @Produces({ MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ResponseBody Token decryptToken(@PathParam("hash") String token, HttpServletRequest request) throws APIException; 

And the implementation:

@Override public Token decryptToken(String token, HttpServletRequest request) throws APIException { 

I seen nothing strange here, it's working fine for queryparams. Any ideas? I am of confuse.

Source Link
Mathijs Segers
  • 6.2k
  • 9
  • 54
  • 78

@PathParam = null

Hi I've been checking lots of posts already but I havent found the problem that's happening with me. My PathParam always is null, can anyone tell me what might be the issue

Imports in interface: import javax.servlet.http.HttpServletRequest; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType;

Interface:

@RequestMapping(value="/unhash/{hash}", method = RequestMethod.GET) @Produces({ MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ResponseBody Token decryptToken(@PathParam("hash") String token, HttpServletRequest request) throws APIException; 

And the implementation:

@Override public Token decryptToken(String token, HttpServletRequest request) throws APIException { 

I seen nothing strange here, it's working fine for queryparams. Any ideas? I am of confuse.