java - to pass filepath in url -
i want hit url , pass filepath in : here sample url:
localhost:8080/coreengine/addrecording/obd_msisdn_pankaj/9958557426/9999620647/{d:\islamic\first}
last 1 filepath.
i receiving @ controller :
@requestmapping(value="/addrecording/{tablename}/{aparty}/{bparty}/{filename}")
public @responsebody string addrecord(@pathvariable("tablename") string tablename, @pathvariable("aparty") string aparty, @pathvariable("bparty") string bparty , @pathvariable("filename") string filename) { return "done"; }
it works url :
http://127.0.0.1:8080/coreengine/addrecording/thispank/356783956/67456/gdshhfdsg
but if hit url :
http://127.0.0.1:8080/coreengine/addrecording/thispank/356783956/67456/e:\out_of_ofc\songs\spirit.mp3
it not work filepath , gives following error @ browser :
it gives error : vedio playback aborted due network error
if hit url
127.0.0.1:8080/coreengine/addrecording/obd_msisdn_pankaj/9958557426/9999620647/?path=e:\out_of_ofc\songs\spirit.mp3
the requested resource not available.
can provide solution problem.
this can done using request method instead of post request , using @requestparam method.
@requestmapping(value="/addrecording", method = requestmethod.get) public @responsebody string addrecord(httpservletrequest request,httpservletresponse response,@requestparam("tablename") string tablename, @requestparam("aparty") string aparty, @requestparam("bparty") string bparty , @requestparam("filename") string filename)
Comments
Post a Comment