*1. (No Result - Red cross mark in place of the image. Server could not execute the xqy file)* <image width="400" height="300"
src="get-img-jpeg.xqy?uri={fn:base-uri(doc("c:/100_2754.JPG")))"/>
Here I have tried to call a XQY file with the input of the uri of the image. The XQY file has the code like the following: module "http://www.w3.org/2003/05/xpath-functions";
let $uri := xdmp:get-request-field("uri")
return (xdmp:set-response-content-type("image/jpeg"), doc($uri))

You wrote a library module (see your module declaration) but are calling it like a main module. If you go to get-img-jpeg.xqy directly (always a good step when debugging dynamic images) you'll probably see an error to that effect. Remove the module line to make your code a main module. Then you'll probably have success. If not, try going to the image directly and see what other error you might be seeing.

It does not show me the image. I want to know
      i)  How can I call an xqy file from a JSP?
      ii) Can I define XQY functions inside a JSP? What will be the syntax?

JSPs are not designed to return binary streams. They're for character output.

-jh-

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to