Hi Frank,
Thanks for your quick reply. The example I have given is bit misleading.
Actually when I have loaded the image into the marklogic server, it was in the
C:\ drive and I have not given any alias url name while loading. After loading
to marklogic server I have removed it from the C:\ drive.
So I don't think that I can show it using the image tag as it will look for
the source of image from the application server whereas my image is only in the
marklogic server. That's why I have tried the second option to show the image
by just calling the doc() function and setting the mime type. But it didn't
work.
regards,
Saptarshi
Frank Rubino <[EMAIL PROTECTED]> wrote:
Saptarshi-
Are you sure that your url is expressed relative to the app server root? Thats
where Ive been tripped up.
Frank
On 5/18/07 1:01 PM, "Saptarshi Newyork" <[EMAIL PROTECTED]> wrote:
Hi,
My first question is regarding display an image from JSP when the image is
stored in Marklogic server.
I have tried 2 things in the JSP as listed below:
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))
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?
2. (return nothing)
<xq:execute >
<xq:query>
let $uri := fn:base-uri(doc("100_2754.JPG"))
return (xdmp:set-response-content-type("image/jpeg"), doc($uri))
</xq:query>
</xq:execute>
I don't want to store the images in the file system and want to store them in
marklogic. Please tell what shall be the right way to solve this problem.
Please also let me know if it is possible to define xquery function in the JSP
and call XQY from JSp?
Thanks in advance,
Regards,
Saptarshi
---------------------------------
It's here! Your new message!
Get new email alerts
<http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>
with the free Yahoo! Toolbar.
<http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>
---------------------------------
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
Frank Rubino
Consultant, Publishing
Mark Logic Corporation
+1 973 893 0875 Office
+1 862 452 2516 Mobile
[EMAIL PROTECTED]
www.marklogic.com
This e-mail and any accompanying attachments are confidential. The information
is intended solely for the use of the individual to whom it is addressed. Any
review, disclosure, copying, distribution, or use of this e-mail communication
by others is strictly prohibited. If you are not the intended recipient, please
notify us immediately by returning this message to the sender and delete all
copies. Thank you for your cooperation.
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
---------------------------------
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing._______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general