Reading image outside webapp contextpath??

I'm making a project that makes a picture gallery that has to be accessible throw web, wap, webdav and file sharing. The project consisting of a ejb backend and struts frontend(using velocity as presentation).
I have made the EJB backend so that each dir with pictures in has a xml file contaning all the pictures file address, thumbnail file address, a wapnail file address and a name.
Now my problem is in the sturts frontend, when I what to show the gallery. Tomcat will not show the picture because it is outside me webapp contextpath.
How do I make tomcat look in this "shared" dir where I got me pic?
Or do I have to do it in a other way?
This is my html:
<img src="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" alt="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" >     If this is the wrong forum then pls let me know so that I can post in the right place.
Thank you all very much ;-)
/Marc

try this instead
<img src="testGallery/webthumb/T_billed4.jpeg" alt="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" >     
for further details, call me on at......[email protected]

Similar Messages

  • Access images outside of tomcat

    Hi,
    Is it possible to have a servlet access image files from a cd or external hard drive? I keep most photos within the webapp but due to size limitations some of the photos need to be moved to external media. I wan't to be able to read and report from either a DVD or an external hard drive but I'm not sure if it is possible for tomcat to read files outside of the tomcat directories.
    Thanks

    I have a servlet called ReportController and it outputs HTML.
    response.setContentType("text/html");          
    PrintWriter out = response.getWriter();
    on my desktop i setup tomcat and i just had to do the following to display an image:
    out.println("<img src="c:/photos/"+photo_name+" height="+height+" width="+width+">");
    now that i added tomcat to my laptop and set everything up the same the images don't show up. Is there a security issue I am missing? Or something else?
    Thanks

  • Anchored images outside of button frame

    Hi Experts
    I am trying to find a way of getting an image to become visible on rollover on a button I've created, without having the image positioned within the button frame. The images are large & I have several small buttons on the page, each linked to text frames with anchored text objects (the images.) Anchoring the images outside the text frame is no problem, but visibility is limited to the button frame.How do I link large images to small buttons that only activate on rollover? Any ideas? PLEASE help!

    Convert that image you want to appear to separate button, and attach show/hide buttons action to your real button. Use rollover as trigger for showing your image, and rollout for hiding it again....

  • Problems while accessing images outside the web document-root folder

    Our application runs on Oracle application server on Linux. Facing problems while accessing images outside the web document-root folder. This works with changes in global-web-application.xml by including the <virtual-directory> tag. The same change does not work when done on Linux machine. It is unable to find the image. Please help in resolving this issue.
    </locale-encoding-mapping>
    </locale-encoding-mapping-list>
    </web-app>
    <virtual-directory virtual-path="/img" real-path="/home/eposuat/" />
    </orion-web-app>
    Code in the jsp:
    <img width=700 height=700 src="/img/3.tif"></img>
    <img width=700 height=700 src="/img/WB.gif"></img>

    This is one of the least satisfactory aspects of site management in Dreamweaver, and several developers, including myself, have been pressuring the Dreamweaver team for some years to improve this. Who knows? They might eventually take notice.
    The only way to do this at the moment is to create two site definitions, one nested inside the other. Set up the site definition normally based on htdocs as your site root. Then create a new site definition based on site. Dreamweaver will nag you that it can cause problems, but it won't actually stop you from doing it. The only potential problem is with site synchronization.
    The problem with using site as the only basis for your site definition is that Dreamweaver automatically puts things like the Connections, Scripts, and other folders in the site root. So, everything ends up at the wrong level of the site hierarchy. Quite frankly, the whole thing is a bit of a pain. Dynamic site development was added to Dreamweaver only in version 6 (Dreamweaver MX), and no one had really thought through the need to store files outside the site root.

  • CFIMAGE gives "attempt to read data outside of exif segment" error when trying to resize jpg

    When trying to resize a jpg using cfimage I receive the following error "attempt to read data outside of exif segment".  Any ideas on what causes this or how to fix it?  This only happens on certain images.  Sample image it happens with attached, this photo is subject to copyright restrictions and should be treated appropriately.  Thanks for any help.
    Resize Code attached.
    <!--- Set some defaults used by each image type, unless you override them --->
    <cfparam name="jpgQuality" default=".8" />
    <cfparam name="defaultInterpolation" default="bicubic" />
    <cfparam name="defaultBackground" default="black" />
    <!--- Set values for each image type --->
    <cfparam name="thumbMaxWidth" default="" />  <!--- leave blank to allow any width (forced to size by height) --->
    <cfparam name="thumbMaxHeight" default="60" /> <!--- leave blank to allow any height (forced to size by width, above) --->
    <cfparam name="thumbQuality" default="1" />  <!--- number from 0 - 1, 1 being the best --->
    <cfparam name="thumbFixedSize" default="false" />  <!--- you MUST set both MaxWidth & MaxHeight to use FixedSize --->
    <cfparam name="thumbBackground" default="#defaultBackground#" />  <!--- color of background if fixed size is used --->
    <cfparam name="thumbInterpolation" default="#defaultInterpolation#" />  <!--- Interpolation method used for resizing (HUGE performance hit depending on what is used) --->
    <cfparam name="normalMaxWidth" default="476" />
    <cfparam name="normalMaxHeight" default="324" />
    <cfparam name="normalQuality" default="#jpgQuality#" />
    <cfparam name="normalFixedSize" default="true" />
    <cfparam name="normalBackground" default="#defaultBackground#" />
    <cfparam name="normalInterpolation" default="#defaultInterpolation#" />
    <cfparam name="zoomMaxWidth" default="670" />
    <cfparam name="zoomMaxHeight" default="380" />
    <cfparam name="zoomQuality" default="#jpgQuality#" />
    <cfparam name="zoomFixedSize" default="true" />
    <cfparam name="zoomBackground" default="#defaultBackground#" />
    <cfparam name="zoomInterpolation" default="#defaultInterpolation#" />
    <!--- Set values for folder paths and the watermark image --->
    <cfparam name="originalFolder" default="path to folder for original images" />
    <cfparam name="thumbFolder" default="path to folder for thumbnail images" />
    <cfparam name="normalFolder" default="path to folder for large images" />
    <cfparam name="zoomFolder" default="path to folder for large resized images" />
    <cfparam name="watermarkImage" default="" />
    <cfparam name="wmXPosition" default="50" />  <!--- value is a number from 0 - 100, 50 = centered --->
    <cfparam name="wmYPosition" default="65" />
    <cffunction name="genWatermarkImage">
        <cfargument name="ImageFile" required="true" />
        <cfargument name="MaxWidth" required="true" />
        <cfargument name="MaxHeight" required="true" />
        <cfargument name="StorePath" required="true" />
        <cfargument name="FixedSize" required="true" type="Boolean" />
        <cfargument name="Background" required="true" />
        <cfargument name="Quality" required="true" />
        <cfargument name="Interpolation" required="true" />
        <cfargument name="AddWatermark" required="true" type="Boolean" />
        <cfif IsImageFile(originalFolder & ImageFile)>
            <cfset original = ImageNew(originalFolder & ImageFile) />
            <cfset originalHeight = ImageGetHeight(original) />
            <cfset originalWidth = ImageGetWidth(original) />
            <cfset outfile = StorePath & ImageFile />
            <cfset watermark = ImageNew(watermarkImage) />
            <cfset ImageScaleToFit(original,MaxWidth,MaxHeight,Interpolation) />
            <cfset new_w = ImageGetWidth(original) />
            <cfset new_h = ImageGetHeight(original) />
            <cfif FixedSize>
                <cfset normal = ImageNew("",MaxWidth,MaxHeight,"rgb",Background) />
                <cfset ImagePaste(normal,original,int((MaxWidth-new_w)/2),int((MaxHeight-new_h)/2)) />
                <cfif AddWatermark>
                    <cfset ImagePaste(normal,watermark,( int(ImageGetWidth(normal)) - int(ImageGetWidth(watermark)) -3),( int(ImageGetHeight(normal)) - int(ImageGetHeight(watermark)) -3) )/>
                </cfif>
                <cfset ImageWrite(normal,outfile,Quality) />
            <cfelse>
                <cfif AddWatermark>
                    <cfset ImagePaste(original,watermark,( int(ImageGetWidth(normal)) - int(ImageGetWidth(watermark)) -3), (int(ImageGetHeight(normal)) - int(ImageGetHeight(watermark)) -3) )/>
                </cfif>
                <cfset ImageWrite(original,outfile,Quality) />
            </cfif>
        <cfelse>
            <cfreturn "Image file not an image!" />
        </cfif>
    </cffunction>
    <cfset zoomError = genWatermarkImage(Filename,zoomMaxWidth,zoomMaxHeight,zoomFolder,zoomFixedSize,zoomBackground,zoomQuality,zoomInterp olation,dowatermark) />

    Hmm, that was my best shot.
    1) Do you have all of the latest updates applied?
    2) Did you try all of the work-arounds listed in the comments. Granted some of them are definite hacks
    3) Just to cover all the bases, do you get the same result with both ImageResize() and ImageScaleToFit()?
    If all else fails, you could always go the java route and try some java code to do the resize.  Obviously not the ideal, but it is worth a shot.  IIRC there is a thread around here somewhere with the cf/java code. But that was from before the switch in forums and I will be darned if I can find it right now!
    Update: I will play around the sample image you posted tomorrow. Just to see if I can come up with anything.

  • Write/read image to avi file, VI works incorrectl​y from the second run

    Hi everybody, in my labview I write image from IMAQ USB to avi file and read image from avi file, the VI runs correctly at the first run then after that it goes wrong, I can write/read only one frame and it terminates automatically. Does anybody know why and how to solve this?
    Thanks a lot,
    Hannah

    Without seeing your code I can't comment specifically, but if it runs correctly the first time and then stops be looking for something that is not getting reinitialized correctly. Also what exactly do you have to do to get it to work again? Close and reopen the VI? Restart LV? Restart the computer?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Cannot read image file in oracle 10g forms, getting error frm-47100

    I'm unable to read the image from the file location. But If I do re-save via MS-Paint the same image then I'm able to load successfully. I want to load image directly instead of re-save.  Error getting like "frm-47100 Cannot read image file".
    Need your co-operation to solve this issue.
    Thanks in advance!
    declare
      tiff_image_dir varchar2(80):=('D:\IMAGE\');
      photo_filename varchar2(80);
    begin
      photo_filename:=tiff_image_dir||:IMAGE_NO||'.JPG';
      if :image_no is null then
      :Image_no :=:UID_NO;
      end if;
      read_image_file(photo_filename,'JPG','image');
      WRITE_IMAGE_FILE('output.tif','TIFF','g_image_info.image',maximize_compression,original_depth)
    end;

    Hi Sindhu,
    By default any operating system file extension starts after the dot. So in this case when it says 2 dots it will think there is something wrong.
    RajeshALex

  • Webutil Read Image Problem

    Hi,
    I am reading image from client system using the below code
    CLIENT_IMAGE.READ_IMAGE_FILE(v_rd_file_name, 'JPG', 'CTRL_BLK.ADD_IMAGE');
    But this image is not displaying in the image item, this is happening for some particular images only. While writing this image into image server image size also increasing.
    We are trying one image that dimension is 2900 X 4700 this is not uploading to image item.
    but i am able to upload less than 2000 X 2000 dimension to the same image item
    below is Image item property
    Image Format : TIFF
    Image Depth : Original
    Display Quality : Medium or High
    Sizing Style : Adjust
    Any idea on thie problem...
    Regards,
    Suresh.V

    hi
    What about Java Bean????
    try the following link i hope it will help u.
    http://forms.pjc.bean.over-blog.com/article-7109292.html
    and also u may use Irfan viewer to resize the image.Did u try to use Crop?
    sasrah

  • Read image direct from file server

    hello, need to help me somebody.
    A like to create form , what read image direct from file server, without store in database.
    Please help me.

    Hi you may go through the below post to find what could be a better way to do that.
    http://forum.java.sun.com/thread.jspa?threadID=5163829
    REGARDS,
    RaHuL

  • Read image from scanner

    i want to interact with hardware(scanner) in java
    i want to read image and store in database
    for this
    1.) i want to read image from scanner
    2.) how do i start scanner process
    from where i gonna start
    plz help me to interact with hardware

    Hi, I have faced a similar problem and solved it using the morena api http://www.gnome.eu/Twain/examples/studio.html
    Problem is the scanner works fine with TWAIN, but with SANE, it is totally failing. There is a permanent connection refusal form the scanner ip whenever
    i try to use a network scanner. I am not sure how to solve it. If anyone has solved this please revert back.
    Regards,
    Anthony

  • Read image from excelsheet using labview

    i need to know how to read image from excel sheet using Labview...m not able to get the appropriate property to display the image stored in excel sheet.
    thank you

    you need to ask Microsoft to find out the property name/location under Microsoft Excel. 

  • Read image metadata

    Hi All,
    Question: Can we read image meta data from CS extension code by any way ?
    I tried it with xmp core library and passed a jpeg file to xmpMeta object which expect a String, a XML or Byte Array as argument:
    private function getImageMetadata(jpeg:File):void
                                  var meta:XMPMeta = new XMPMeta(jpeg);
                                  var packet:XML = meta.serializeToXML();
                                  var photoshop:Namespace = XMPConst.photoshop;
                                  var value:String = meta.photoshop::AuthorsPosition;
    If I was able to convert jpeg file to Byte Array, I my guess to be work but I'm not able to find it workable.
    Can someone help me to complete the task?
    Thanks
    Mac

    Hi All,
    Question: Can we read image meta data from CS extension code by any way ?
    I tried it with xmp core library and passed a jpeg file to xmpMeta object which expect a String, a XML or Byte Array as argument:
    private function getImageMetadata(jpeg:File):void
                                  var meta:XMPMeta = new XMPMeta(jpeg);
                                  var packet:XML = meta.serializeToXML();
                                  var photoshop:Namespace = XMPConst.photoshop;
                                  var value:String = meta.photoshop::AuthorsPosition;
    If I was able to convert jpeg file to Byte Array, I my guess to be work but I'm not able to find it workable.
    Can someone help me to complete the task?
    Thanks
    Mac

  • Read image raw data without creating image

    Is there any way to read image raw data into an array from a file but not creating an image ? I looked through ImageIO. It seems that every time an image reader is called , a bufferediamge is created or reused ?
    Tanks fro any advice.

    Is there any way to read image raw data into an array from a file but not creating an image ? I looked through ImageIO. It seems that every time an image reader is called , a bufferediamge is created or reused ?
    Tanks fro any advice.

  • Read Image File Error

    When I read image with Read_Image_File procedure i got an error in specified files 'FRM-47100 can not read image c:\abc.jpg'
    i think it is on high resolution please promply resolve it. its very urgent
    best regards
    R E H AN M I R Z A

    Hello,
    Found this on Metalink:
    Problem Description
    You are trying to use READ_IMAGE_FILE in forms to read a JPG image,
    but you receive the following error:
    FRM-47100: Cannot read image file <file name>
    You checked the following:
    o You are able to open the image file from Netscape or Internet Explorer and
    see your image correctly.
    o You are also sure that the file exists under the location mentioned in the
    first parameter to READ_IMAGE_FILE built-in.
    o You tried other JPG files that are located in the demo directory of the
    Developer home and you can see the image loaded in the image item.
    Solution Description
    There are many JPEG formats. The only JPEG format supported in Forms is the
    JPEG File Interchange Format (JFIF) which is the baseline sequential DCT JPEG.
    Progressive JPEG (as well as Lossless JPEG and Hierarchical JPEG),
    are not currently supported.
    Possibly your image file is stored using one of the non-supported formats.
    As a workaround, you can convert progressive JPEG format to and from baseline
    JPEG. There is a free set of programs provided by the Independent JPEG Group
    that allows this.
    The Independent JPEG Group home page is: http://www.ijg.org/
    Francois

  • Read-image-file show jpeg photo cause error

    I use read-image-file to show a jpeg photo (edited by ACDSEE) cause frm-47100. I know that Oracle may not support the Jpeg format of ACDSee. But, anyone know how to solve this problem. (I have to keep using ACDSee)

    If you remove the metadata from a JPEG it should usually do the trick. I don't know how to do that in ACDSee, though.

Maybe you are looking for

  • Which system for iMac 400MHz 384MB RAM?

    Hello, I'm going to buy old iMac with 400MHz G3, 384MB RAM and 10GB HDD. Please, what is your experience with Jaguar/Panther/Tiger on such computer? Which one is most suitable/swift? I'd like to do programming most (Xcode), no extreme audio/video. Th

  • Leak Monitor displays many memory leak alerts

    Firefox uses too much memory and I installed Leak Monitor extension, suggested by Firefox Support pages. Now when I open the browser or browse it throws out many "Reclaimed Leak Alert" and "New Leak Alert" alerts. Firefox 4

  • RAC Differences for Standard and Enterprise Editions of 10g

    Are there any differences between RAC implementations for Oracle 10g SE and RAC option for Oracle 10g Enterprise Edition (except CPU numbers limitations and CRS&ASM necessity)? I heard some buzz what RAC for SE have only HA abilities.

  • I need a program to back up my Tiger

    I have 10.4 and I am thinking of upgrading to 10.5, so naturally, I want to back up my data. What programs (free) should I consider to help me do this? I saw RsyncX mentioned, but couldn't find it to download anywhere--all the pages were either remov

  • Use of boolean property node in LabView 6i

    I am running LabView 6i version 6.0.2. I am using a reference to a front panel boolean control to stop the execution of a state machine in a subVI.  The subVI has a property node linked to this reference.  This property node shows that it is "Bool",