I have Json response from my database . I am using Php for this which can be viewed over here . In this we can search the record from identifier value like identifier =123 . Is that possible to to show this response in the Jsp page . like when i put the identifier value in the text box of jsp page ,it can give the response from that database
Share
Since the PHP response does not have the access control headers which would allow crossdomain access by JS/Ajax, you would need to handle this fully at the server side.
Use
java.net.URLto get the PHP response as anInputStream. Use a JSON (de)serializer like Google Gson to convert the JSON string to an fullworthy Javabean. You can do this in a servlet. Finally store this Javabean in the request scope and let JSP display it.