AnsweredAssumed Answered

Accessing the Image Content

Question asked by sowmiya on Nov 17, 2009
Latest reply on Nov 24, 2009 by sowmiya
I am new to handle the Web Scripts. I tried with the simple web script to access the image content. Here is my sample code of that.

image.get.desc.xml

<webscript>
   <shortname>Image</shortname>
   <description>Image description</description>
   <url>/image</url>
</webscript>

image.get.html.ftl

<img src="/alfresco/d/d/workspace/SpacesStore/37cc4323-710d-4c55-b193-68efdaa9eae4/smiley.gif" alt="Alfresco" />

It works fine when i hit the URL http://localhost:8080/alfresco/service/image after logging in Alfresco correctly.  :)

My requirement is to call this URL from other Web application. But it is not working when i call from my other web appliation. I didnt get the image when i hit the URL .  :cry:
Here is my sample JSP code where i try to hit the web script URL.

index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Image</title>
</head>
<body>
<a href="http://localhost:8080/alfresco/service/image" > click to view the image</a>
</body>
</html>

Please help me out where am going wrong. Thanks in advance.  :)

Outcomes