How to specify image directory in Tomcat servlet?

The following will display the counter.png image stored in my Tomcat webapps/ROOT/images directory (even from a servlet at webapps/counters):outText.println("<IMG SRC=\"/images/counter.png\">");but what's the magical incantation to get at webapps/counters/images/counter.png... which is where I want to create the things (and am successfully doing so- I just can't get them to display!)?
Tomcat comes with some servlet webapps/examples that display "navigation" graphics from the webapps/examples/images directory, but the example code doesn't include the navigation bits!)outText.println("<IMG SRC=\"/counter/images/counter.png\">");and other seemingly obvious variations do not work.

So, it appears the "current directory" is webapps/ROOT. If you want to get at webapps, you need the parent of the current directory, which is denoted by "..". Therefore, to get at webapps/counters/images/counter.png, you need "../counters/images/counter.png".

Similar Messages

  • How to specify the directory in which we want to store the uploaded files

    Hello !!
    I am using apache commonfile upload for uploading my files.I followed the user guide and tried to run a program,but my problem is I am not able to understand as to how to mention the directory in which the uploaded file will be saved..My code is given below :
    package r;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import org.apache.commons.fileupload.*;
    import org.apache.commons.fileupload.servlet.*;
    import org.apache.commons.fileupload.disk.*;
    import org.apache.commons.io.*;
    import java.lang.Exception;
    public class fileupload extends HttpServlet
         public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException
                   // Check that we have a file upload request
                  boolean isMultipart = ServletFileUpload.isMultipartContent(request);
                 System.out.println(isMultipart);
                 if (ServletFileUpload.isMultipartContent(request))
                 // Create a factory for disk-based file items
                   FileItemFactory factory = new DiskFileItemFactory();
                   // Create a new file upload handler
                   ServletFileUpload upload = new ServletFileUpload(factory);
                   // Parse the request
                   try {
                               List items= upload.parseRequest(request);               
                             Iterator iter = items.iterator();
                             while (iter.hasNext())
                                   FileItem item = (FileItem) iter.next();                    
                                 if (item.isFormField()) //NORMAL FORM FIELD
                                 String name = item.getFieldName();
                                  String value = item.getString();
                                  System.out.println(value);                                                             
                                  else
                                 String fileName = item.getName();
                                 System.out.println(fileName);
                                    String contentType = item.getContentType();
                                  File saveTo = new File("/info/upload_files/myFile.jpeg");
                             try
                                       item.write(saveTo);
                                       System.out.println("File written" );                    
                             catch(Exception e)
                                         System.out.println("File not written");
                                   // InputStream fs= item.getInputStream();                    
                                   fileName = FilenameUtils.getName(fileName);
                                    System.out.println(fileName);
                        }//end of try
              catch (Exception e) { }
         public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
                 doGet(request,response);
    The problem is that the control doesn't reach the try statement and I get " File not written" on the console because it enters catch everytime..Please tell me how the path to the directory should be given...Rest of the code is working fine

    No, the problem is that when an Exception is thrown, you ignore it completely and throw away all the information associated with it. That leaves you to guess at what the problem is. So instead of answering your guess at a good question, I'm going to suggest that in all of your catch blocks you put this code:e.printStackTrace();Then you can look at the output in the log file and see what the problem is. Start from there.

  • How to specify source directory in File sender adpate using (NFS)?

    Hello experts,
    I am doing File-PI-Proxy scenario.
    Input file is available on machine which is within the Network area and FTP is not available on that machine.
    For this reason I am using the NFS Transport Protocol.
    In ID File sender I have specified Source Directory:-
    IP Address\Directory
    I am geeting the Error in RWB as 'Configured source directory '
    IP Address\Directory' does not exist'.
    Please suggest how to specify the Source Directory path.
    Regards,
    Jagesh

    Hi,
    If you want to use NFS protocol, then the file needs to be within the a folder in the XI server and not outside it, In your case if you need to use the file in a different machine which is on a network then try to use the FTP protocol.
    Refer this blog:
    /people/shabarish.vijayakumar/blog/2006/08/01/along-came-a-file-adapter-mr-ftp-and-rest-of-the-gang which shows the details of how you can install a local FTP and use it
    Regards,
    Nithiyanandam
    Edited by: Nithiyanandam A.U. on Mar 18, 2009 10:43 AM

  • How to hide image directory from search engines?

    Hi,
    This is more an SEO question than DW but I can't think who else to ask and I suspect this crowd will know the answer...
    I feel like this is a new thing....my image directory is showing up in google for a site that isn't even live yet.  The index page is just an image.  But I've got dozens of pages on my server and hundreds of photos in an image directory for the images on those dozens of pages.  But the current temporary, static index page doesn't have any links to the interior pages yet.  I dont remember ever having this happen where (1) the pages that are on my server are being indexed even though there isn't an index page with links to it and (2) I've never seen my image directory show up on Google! I sure don't want that. It's all my original psd files with layers etc.
    Is this a "no follow" kind of issue? Is this a new issues? How do I prevent my image directory from showing up in google? It was bizarre...I did a search in google for a term and it brought up my own image directory with an image named that name!! I almost had a heart attack.
    Anyone have a favorite SEO forum to post this in as well?
    Any help appreciated.
    Laura

    As always, you are such a reliable source of help! :-)
    That robots.txt you mentioned...do what with that?  I mean, how does that tell it "dont index the images"? For that matter, there are tons of pages on the server I don't want being indexed yet either because they are half baked for later development.
    Thanks!
    Create the file, and upload it to the root directory.  It's as simple as that.  But you'll have to read the details on the google hits to see the exact syntax of the exclusions.
    Now - here's why this is happening....
    Somewhere, google has found a link to this URL -
    http://bluehippotravel.com/photos/destinations/TH/
    The bluehippotravel host has NOT disabled directory browsing.  When you browse to that URL, instead of getting a FORBIDDEN message like you should, you get a page listing the contents of that directory.  Google is indexing that page.  Ask your host to turn off directory browsing for that folder.

  • How to specify the directory of a file created by FileOutputStream?

    I created a file name registry.reg. Can I specify the directory of the file so that it would be located in certain directory. For example I want to put registry in C:\Desktop
    FileOutputStream fileStream = new FileOutputStream ("registry.reg");

    Well, just provide the complete path as file name parameter. On Windows, remember to escape those backslashes:
    FileOutputStream fileStream = new FileOutputStream ("C:\\Desktop\\registry.reg");

  • How to produce image map with java servlet?

    Hello,
    I know the way to produce an image map from a static image. And I also know how to use ServeltOutputStream to generate an image on the fly. But I don't know how to use the dynamically generated image to produce an image map. Can anyone help me? Thanks a lot!
    Louis

    The database is a BioSQL database and I am using Biojava "BioSQLSequenceDB class" to access it. Sorry I don't really know the schema of the BioSQL
    The easiest example is to ignore the database totally.
    At the moment, I just want to do the folloing thing:
    1. Use HTML form to retireve the height and length of a rectangle that user specified
    2. draw the rectangle on the fly
    3. make the rectangle a hyper link to an HTML documet, which represents "Hello world" to the user
    Could you show me how to do it please?
    Thanks very much.
    Louis

  • FTP Adapter on OSB - how to specify logical directory path

    I am using the ftp adapter on osb 11g (Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Thu Aug 19 02:10:08 PDT 2010 ] Oracle Weblogic Server Version: [WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 ])
    I defined the ftp adapter using jdev and imported the jca artifacts into osb.
    I created a business service using jca adapter to put the file to the ftp server.
    The problem is the write directory on the ftp server is different for each environment - DEV, QA, PROD.
    I used a physical directory specification when defining the adapter in JDEV because it wasn't clear from the help how i would override a logical directory during deployment to osb (it is clear if deploying to soa suite).
    Is there a way to override this dynamically override this directory at runtime. Or even better a way to override during deployment time?

    You do it either way....
    Import the SBConfig jar into the sbconsole and change the value in the JCA file
    or
    Re: Customizing JCA FTP Adapter properties in OSB

  • VIRTUAL DIRECTORY in TOMCAT 5.5

    Hi all ,
    I am abeal to create a virtual directory under tomcat , I want to create another virtual directory under a virtual in tomcat , is there any way to do this ?
    As far as my knowledge is concern , IIS has the power to do this .
    Thanks ,
    SB

    gladiator_cbe,
    Did you ever figure this out? I cannot figure out how to create aVirtual Directory in Tomcat 6?
    Thanks

  • How to specify  a servlet mapping as the url pattern with in the security constraints

    Hi ,
    Weblogic 6.0 documentation says the following:-
    Define which resources in the Web Application the security constraint applies to using the <url-pattern> element that is nested inside the <web-resource-collection> element. The <url-pattern> can refer to either a directory, filename or a <servlet-mapping>.
    To apply the security constraint to the entire Web Application, use the following <url-pattern>:
    <url-pattern>/*</url-pattern>
    Could any one let me know how to specify servlet mapping as the url pattern.
    I tried various combination and it doesn't seem to work and any help in this regard will be greatly appreciated.
    Thanks
    kannan

    The answer is posted here:
    Unapproved User Flag in UME

  • How to specify maximum memory usage for Java VM in Tomcat?

    Does any one know how to setup memory usage for Java VM, such as "-Xmx256m" parameter, in Tomcat?
    I'm using Tomcat 3.x in Apache web server on Sun Solaris platform. I already tried to add the following line into tomcat.properties, like:
    wrapper.bin.parameters=-Xmx512m
    However, it seems to me that this doesn't work. So, how about if my servlet will consume a large amount of memory that exceeds the default 64M memory boundary of Java VM?
    Any idea will be appreciated.
    Haohua

    With some help we found the fix. You have to set the -Xms and -Xmx at installation time when you install Tomcat 4.x as a service. Services do not read system variables. Go to the command prompt in windows, and in the directory where tomcat.exe resides, type "tomcat.exe /?". You will see jvm_options as part of the installation. Put the -Xms and -Xmx variables in the proper place during the install and it will work.
    If you can't uninstall and reinstall, you can apply this registry hack that dfortae sent to me on another thread.
    =-=-=-=-=-=
    You can change the parameters in the Windows registry. If your service name is "Apache Tomcat" The location is:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat\Parameters
    Change the JVM Option Count value to the new value with the number of parameters it will now have. In my case, I added two parameters -Xms100m and -Xmx256m and it was 3 before so I bumped it to 5.
    Then I created two more String values. I called the first one I added 'JVM Option Number 4' and the second 'JVM Option Number 5'. Then I set the value inside each. The first one I set to '-Xms100m' and the second I set to '-Xmx256m'. Then I restarted Tomcat and observed when I did big processing the memory limit was now 256 MB, so it worked. Hope this helps!
    =-=-=-=-=
    I tried this and it worked. I did not want to have to go through the whole reinstallation process, so this was best for me.
    Thanks to all who helped on this.

  • How to specify SWF instead of an image in loading

    I hope it is not too much over my head as I would like to make it work. Some time ago I recieved help in constracting an interactive image thumb scroller using greensock features.
    My biggest problem at the moment is that I can not figure out how to change the code so the thumbs would bring up the swf files and not jpg files. In other words my small thumbnails are small jpg files (as they were intended to be), but my bigger visuals (the ones which are being brought by clicking on the small thumbnails) I would like to change to an swf file (as it contains its separate animation and additional set of buttons)
    Here is the original code I am trying to modify:
    [CODE]
    package {
    import com.greensock.TweenLite;
    import com.greensock.events.LoaderEvent;
    import com.greensock.loading.ImageLoader;
    import com.greensock.loading.LoaderMax;
    import com.greensock.loading.XMLLoader;
    import com.greensock.plugins.AutoAlphaPlugin;
    import com.greensock.plugins.ColorTransformPlugin;
    import com.greensock.plugins.GlowFilterPlugin;
    import com.greensock.plugins.TweenPlugin;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    public class SlideshowExample extends MovieClip {
      private static const _THUMB_WIDTH:Number = 100;
      private static const _THUMB_HEIGHT:Number = 64;
      private static const _IMAGE_WIDTH:Number = 550;
      private static const _IMAGE_HEIGHT:Number = 355;
      private static const _THUMB_GAP:Number = 4;
      private static const _SCROLL_SPEED:Number = 12;
      private static const _SCROLL_AREA:Number = 150;
      private var _progressBar:MovieClip;
      private var _arrowLeft:MovieClip;
      private var _arrowRight:MovieClip;
      private var _slides:Array;
      private var _curSlide:Slide; //Slide that is currently displaying
      private var _loadingSlide:Slide; //only used when a Slide is supposed to show but hasn't been fully loaded yet (like if the user clicks "next" many times before all the images have loaded). We keep track of the one that's in the process of loading and should be shown as soon as it finishes, then we set _loadingSlide back to null.
      private var _imagesContainer:Sprite; //the Sprite into which the full-size images are placed (this helps manage the stacking order so that the images can always be behind everything else and yet we can addChild() each image so that it shows up on top of the previous one)
      private var _thumbnailsContainer:Sprite; //the Sprite into which the thumbnail images are placed. This also allows us to slide them all at the same time.
      private var _destScrollX:Number = 0; //destination x value for the _thumbnailsContainer which is used for scrolling it across the bottom. We don't want to use _thumbnailsContainer.x because it could be in the process of tweening, so we keep track of the end/destination value and add/subtract from it when creating our tweens.
      private var _minScrollX:Number; //we know the maximum x value for _thumbnailsContainer is 0, but the mimimum value will depend on how many thumbnail images it contains (the total width). We calculate it in the _setupThumbnails() method and store it here for easier/faster scrolling calculations in the _enterFrameHandler()
      public function SlideshowExample() {
       super();
       //activate the plugins that we'll be using so that TweenLite can tween special properties like filters, colorTransform, and do autoAlpha fades.
       TweenPlugin.activate([AutoAlphaPlugin, ColorTransformPlugin, GlowFilterPlugin]);
       _progressBar = this.getChildByName("progress_mc") as MovieClip;
       _arrowLeft = this.getChildByName("arrowLeft_mc") as MovieClip;
       _arrowRight = this.getChildByName("arrowRight_mc") as MovieClip;
       _arrowLeft.visible = _arrowRight.visible = false;
       _imagesContainer = new Sprite();
       this.addChildAt(_imagesContainer, 0);
       _thumbnailsContainer = new Sprite();
       addChild(_thumbnailsContainer);
       _thumbnailsContainer.y = _IMAGE_HEIGHT;
       _thumbnailsContainer.alpha = 0; //we want alpha 0 initially because we'll fade it in later when the thumbnails load.
       _thumbnailsContainer.visible = false; //ensures nothing is clickable.
       var xmlLoader:XMLLoader = new XMLLoader("assets/data.xml", {onComplete:_xmlCompleteHandler});
       xmlLoader.load();
      private function _xmlCompleteHandler(event:LoaderEvent):void {
       _slides = [];
       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
       var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
       //loop through each <image /> node and create a Slide object for each.
       for each (var image:XML in imageList) {
        _slides.push( new Slide(image.@name,
              image.@description,
              new ImageLoader("assets/thumbnails/" + image.@name + ".jpg", {name:image.@name + "Thumb", width:_THUMB_WIDTH, height:_THUMB_HEIGHT, scaleMode:"proportionalInside", bgColor:0x000000, estimatedBytes:13000, onFail:_imageFailHandler}),
              new ImageLoader("assets/images/" + image.@name + ".jpg", {name:image.@name + "Image", width:_IMAGE_WIDTH, height:_IMAGE_HEIGHT, scaleMode:"proportionalInside", bgColor:0x000000, estimatedBytes:820000, onFail:_imageFailHandler})
       //now create a LoaderMax queue and populate it with all the thumbnail ImageLoaders as well as the very first full-size ImageLoader. We don't want to show anything until the thumbnails are done loading as well as the first full-size one. After that, we'll create another LoaderMax queue containing the rest of the full-size images that will load silently in the background.
       var initialLoadQueue:LoaderMax = new LoaderMax({onComplete:_initialLoadComplete, onProgress:_progressHandler});
       for (var i:int = 0; i < _slides.length; i++) {
        initialLoadQueue.append( _slides[i].thumbnailLoader );
       initialLoadQueue.append(_slides[0].imageLoader); //make sure the very first full-sized image is loaded initially too.
       initialLoadQueue.load();
       _setupThumbnails();
      private function _initialLoadComplete(event:LoaderEvent):void {
       //now that the initial load is complete, fade out the progressBar. autoAlpha will automatically set visible to false once alpha hits 0.
       TweenLite.to(_progressBar, 0.5, {autoAlpha:0});
       //fade in the thumbnails container
       TweenLite.to(_thumbnailsContainer, 1, {autoAlpha:1});
       _setupArrows();
       //setup the ENTER_FRAME listeners that controls the thumbnail scrolling behavior at the bottom
       this.stage.addEventListener(Event.ENTER_FRAME, _enterFrameHandler, false, 0, true);
       //now put all the remaining images into a LoaderMax queue that will load them one-at-a-time in the background in the proper order. This can greatly improve the user's experience compared to loading them on demand which forces the user to wait while the next image loads.
       var imagesQueue:LoaderMax = new LoaderMax({maxConnections:1});
       for (var i:int = 1; i < _slides.length; i++) {
        imagesQueue.append( _slides[i].imageLoader );
       imagesQueue.load();
       //now start the slideshow
       _showNext(null);
      //loops through all the thumbnail images and places them in the proper order across the bottom of the screen and adds CLICK_THUMBNAIL listeners.
      private function _setupThumbnails():void { 
       var l:int = _slides.length;
       var curX:Number = _THUMB_GAP;
       for (var i:int = 0; i < l; i++) {
        var thumbnail:Sprite = _slides[i].thumbnail;
        _thumbnailsContainer.addChild(thumbnail);
        TweenLite.to(thumbnail, 0, {colorTransform:{brightness:0.5}});
        _slides[i].addEventListener(Slide.CLICK_THUMBNAIL, _clickThumbnailHandler, false, 0, true);
        thumbnail.x = curX;
        thumbnail.y = 4;
        curX += _THUMB_WIDTH + _THUMB_GAP;
       _minScrollX = _IMAGE_WIDTH - curX;
       if (_minScrollX > 0) {
        _minScrollX = 0;
      private function _setupArrows():void {
       _arrowLeft.alpha = _arrowRight.alpha = 0;
       _arrowLeft.visible = _arrowRight.visible = true;
       _arrowLeft.addEventListener(MouseEvent.ROLL_OVER, _rollOverArrowHandler, false, 0, true);
       _arrowLeft.addEventListener(MouseEvent.ROLL_OUT, _rollOutArrowHandler, false, 0, true);
       _arrowLeft.addEventListener(MouseEvent.CLICK, _showPrevious, false, 0, true);
       _arrowRight.addEventListener(MouseEvent.ROLL_OVER, _rollOverArrowHandler, false, 0, true);
       _arrowRight.addEventListener(MouseEvent.ROLL_OUT, _rollOutArrowHandler, false, 0, true);
       _arrowRight.addEventListener(MouseEvent.CLICK, _showNext, false, 0, true);
      private function _showNext(event:Event=null):void {
       //if there's a _loadingSlide we should assume that the next Slide would be AFTER that one. Otherwise just get the one after the _curSlide.
       var next:int = (_loadingSlide != null) ? _slides.indexOf(_loadingSlide) + 1 : _slides.indexOf(_curSlide) + 1;
       if (next >= _slides.length) {
        next = 0;
       _requestSlide(_slides[next]);
      private function _showPrevious(event:Event=null):void {
       //if there's a _loadingSlide we should assume that the previous Slide would be BEFORE that one. Otherwise just get the one before the _curSlide.
       var prev:int = (_loadingSlide != null) ? _slides.indexOf(_loadingSlide) - 1 : _slides.indexOf(_curSlide) - 1;
       if (prev < 0) {
        prev = _slides.length - 1;
       _requestSlide(_slides[prev]);
      private function _requestSlide(slide:Slide):void {
       if (slide == _curSlide) {
        return;
       //kill the delayed calls to _showNext so that we start over again with a 5-second wait time.
       TweenLite.killTweensOf(_showNext);
       if (_loadingSlide != null) {
        _cancelPrioritizedSlide(); //the user must have skipped to another Slide and didn't want to wait for the one that was loading.
       //if the requested Slide's full-sized image hasn't loaded yet, we need to show the progress bar and wait for it to load.
       if (slide.imageLoader.progress != 1) {
        _prioritizeSlide(slide);
        return;
       //fade the old Slide and make sure it's not highlighted anymore as the current Slide.
       if (_curSlide != null) {
        TweenLite.to(_curSlide.image, 0.5, {autoAlpha:0});
        _curSlide.setShowingStatus(false);
       _curSlide = slide;
       _imagesContainer.addChild(_curSlide.image); //ensures the image is at the top of the stacking order inside the _imagesContainer
       TweenLite.to(_curSlide.image, 0.5, {autoAlpha:1}); //fade the image in and make sure visible is true.
       _curSlide.setShowingStatus(true); //adds an outline to the image indicating that it's the currently showing Slide.
       TweenLite.delayedCall(5, _showNext); //create a delayedCall that will call _showNext in 5 seconds.
      private function _prioritizeSlide(slide:Slide):void {
       TweenLite.to(_progressBar, 0.5, {autoAlpha:1}); //show the progress bar
       _loadingSlide = slide;
       _loadingSlide.imageLoader.addEventListener(LoaderEvent.PROGRESS, _progressHandler);
       _loadingSlide.imageLoader.addEventListener(LoaderEvent.COMPLETE, _completePrioritizedHandler);
       _loadingSlide.imageLoader.prioritize(true); //when the loader is prioritized, it will jump to the top of any LoaderMax queues that it belongs to, so if another loader is in the process of loading in that queue, it will be canceled and this new one will take over which maximizes bandwidth utilization. Once the _loadingSlide is done loading, the LoaderMax queue(s) will continue loading the rest of their images normally.
      private function _cancelPrioritizedSlide():void {
       TweenLite.to(_progressBar, 0.5, {autoAlpha:0}); //hide the progress bar
       _loadingSlide.imageLoader.removeEventListener(LoaderEvent.PROGRESS, _progressHandler);
       _loadingSlide.imageLoader.removeEventListener(LoaderEvent.COMPLETE, _completePrioritizedHandler);
       _loadingSlide = null;
      private function _completePrioritizedHandler(event:LoaderEvent):void {
       var next:Slide = _loadingSlide; //store it in a local variable first because _cancelPrioritizedSlide() will set _loadingSlide to null.
       _cancelPrioritizedSlide();
       _requestSlide(next);
      private function _progressHandler(event:LoaderEvent):void {
       _progressBar.progressBar_mc.scaleX = event.target.progress;
      private function _clickThumbnailHandler(event:Event):void {
       _requestSlide(event.target as Slide);
      private function _rollOverArrowHandler(event:Event):void {
       TweenLite.to(event.currentTarget, 0.5, {alpha:1});
      private function _rollOutArrowHandler(event:Event):void {
       TweenLite.to(event.currentTarget, 0.5, {alpha:0});
      private function _enterFrameHandler(event:Event):void {
       if (_thumbnailsContainer.hitTestPoint(this.stage.mouseX, this.stage.mouseY, false)) {
        if (this.mouseX < _SCROLL_AREA) {
         _destScrollX += ((_SCROLL_AREA - this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;
         if (_destScrollX > 0) {
          _destScrollX = 0;
         TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
        } else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {
         _destScrollX -= ((this.mouseX - (_IMAGE_WIDTH - _SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;
         if (_destScrollX < _minScrollX) {
          _destScrollX = _minScrollX;
         TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
      //if an image fails to load properly, remove it from the slideshow completely including its thumbnail at the bottom.
      private function _imageFailHandler(event:LoaderEvent):void {
       var slide:Slide;
       var i:int = _slides.length;
       while (--i > -1) {
        slide = _slides[i];
        if (event.target == slide.thumbnailLoader || event.target == slide.imageLoader) {
         slide.dispose();
         _slides.splice(i, 1);
         _setupThumbnails();
         return;
    [/CODE]
    I could figure out that I have to change the line
    [CODE]
    new ImageLoader("assets/images/" + image.@name + ".jpg", {name:image.@name + "Image", width:_IMAGE_WIDTH, height:_IMAGE_HEIGHT, scaleMode:"proportionalInside", bgColor:0x000000, estimatedBytes:820000, onFail:_imageFailHandler}
    [/CODE]
    and instead of ".jpg" put ".swf" (making sure that the names of the files are identical except for their extensions)
    The problem is that I get an error message in the output that flash could not convert my swf file to the bitmap.
    I suspect that I have to change the hard coding to specify that Loader Max should treat loading bigger swf files as swf and not as image/jpg files.
    I don't have enough expertise to decipher all the lines where this has to be changed.
    It feels that I am close to accomplishing what I need. Is it possible to point out where this change has to take place?
    Here is my thought process:
    I don't need to specify SWFLoader as LoaderMax is already specified (line 5)
    I don't need to change anything in lines 31-34 as "Sprite" and "Slide" could be an .swf file (line31-34)
    I don't need to change anything in line 50 for the same reason (line 50)
    I don't need to change lines 66 and 68 as image list may contain swf files (line 66 and 68)
    I do need to change ".jpg" to ".swf" in line 72 (line 72)
    No sure if there are any changes in line 82 (line 82)
    LoaderMax has var as imagesQueue does that need to be changed into SFWLoader? (lines98-102)
    I don't think anything need to be changed in lines 138-173 as " Slide" can incorporate an SWF file (lines 138-173)
    Not sure if there has to be a change in lines 175-177 as it specifies that slide is an image (lines 175-177)
    Not sure if there has to be a change in lines 182-200 from imageLoager to SWFLoader (lines 182-200)
    Not sure if there has to be a change in lines 239-245 in specifying SWFLoader (lines 239-245)
    I am attaching the .xml and .as documents as well

    This was my very first step.
    The problem is that I get an error message in the output that flash could not convert my swf file to the bitmap.
    I suspect that I have to change the hard coding to specify that Loader Max should treat loading bigger swf files as swf and not as image/jpg files.
    I don't have enough expertise to decipher all the lines where this has to be changed.
    It feels that I am close to accomplishing what I need. Is it possible to point out where this change has to take place?
    Just in case here is my xml code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <data>
              <image name="agencynet" description="agencynet description text goes here." />
              <image name="buick" description="buick description text goes here." />
              <image name="cocacola" description="cocacola description text goes here." />
              <image name="cu3er" description="cu3er description text goes here." />
              <image name="diva" description="diva description text goes here." />
              <image name="dow" description="dow description text goes here." />
              <image name="erkyperky" description="erkyperky description text goes here." />
              <image name="flexa" description="flexa description text goes here." />
              <image name="happyplanetshots" description="happyplanetshots description text goes here." />
              <image name="holdencruze" description="holdencruze description text goes here." />
              <image name="ironman" description="ironman description text goes here." />
              <image name="mercedes" description="mercedes description text goes here." />
              <image name="micromaniac" description="micromaniac description text goes here." />
              <image name="overtheatlantic" description="overtheatlantic description text goes here." />
              <image name="saab" description="saab description text goes here." />
              <image name="silverpistol" description="silverpistol description text goes here." />
              <image name="softse" description="softse description text goes here." />
              <image name="target" description="target description text goes here." />
              <image name="tonydorio" description="tonydorio description text goes here." />
              <image name="prius" description="prius description text goes here." />
              <image name="waterlife" description="waterlife description text goes here." />
    </data>

  • How to specify URL in server.xml of Tomcat

    Hi Everybody,
    I need help.How to specify url in the server.xml.
    I developed one application in the Tomcat 3.3.I want to access the by entering uri(like:http:test.com).
    What are tags to enter in the server.xml.
    Right now i am accessing like:http://localhost:8080/Test/Login.jsp
    I want replace this with (www.test.com).
    This site will access from anywhere means it is going to live.
    So what are things have to do in the server.xml
    Please provide the solution.
    Regards
    Sridhar

    Hi Raktim:
    I looked around on SDN and it seems that i have found what you have been looking for.
    Kindly look at page number 24 and 25 of this page
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4d46fb8a-0b01-0010-9fbe-e4b96533b222
    P.S: Kindly assign points if your query is resolved, also close the question to assist other users narrow the search and find solutions

  • How to get the full image directory when i upload the image to web page???

    hai, how to get the full image directory when i upload the image to web page???
    here is the example:
    <form action="uploadfile.jsp" method="post">
    image<input type="file" name="image" />
    <input type="submit" value="submit"/>
    <%
    String s=request.getParameter("image");
    %>
    <%=s%>
    </form>
    i upload the image from C:\image\center.gif. i use request.getParameter just can get the image name like "center.gif". Can anybody help me how to get the full path name. Thanks a lot..

    There is no need to get the path. It is also fairly pointless as the server cannot access the client's local file system.
    Carefully read this article how you can upload files the right way: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • How to copy /images/ to /i/ when ...\Apache\ directory does not exist?

    My head is spinning... Need help!
    Background:
    My Oracle apex 4 is running fine on 10g except that the CHARTS DON'T WORK. I've upgraded from apex 3 recently (which was working well) and replaced /i/ directory content with oracle_home\apex\images by using web folders pointing to http://my10gserver:8080/i/. I had errors while copying files and apex 4 did not work right away until after several attempts of redoing /i/. I still suspect that not everything got copied over to/i/ correctly being the reason for not working charts.
    Problem:
    Everywhere I look (Oracle docs or OTN) the instructions are to "xcopy /E /I APEX_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images". The problem is that I DON'T HAVE ...\Apache\ directory anywhere on the server, neither do I have marvel.conf file referenced in the same context.
    I have apex 4 running on 10g on another machine and everything is OK there including charts but still no ...\Apache\, no marvel.conf...
    Questions:
    1. Why my apex/10G standard installation does not have \Apache\images directory (never had even when I was on apex 3) while working?
    2. Do I really need to be concerned about having that directory at all if my apex is running just fine (including charts)?
    3. ULTIMATE question. How do I upgrade my /i/ directory properly by following the instructions if I can't find ...\Apache\ and WebFolders approach does not seem to be working well.
    THANK YOU!

    Hi gleb,
    which web server do you use to host your APEX? Sounds like you are running APEX with EPG. If so, you looked into the wrong part of the installation manual. You should consider this section which describes how to upadte the images in your database:
    http://download.oracle.com/docs/cd/E17556_01/doc/install.40/e15513/otn_install.htm#BHAJIGDA
    -Udo

  • How to put image files on fs directory instead of in DB?

    Hi,
    Currently I have logo image file (ie: logo.jpg) in DB. But I want to put it in file system directory for performance reason. So I
    1) put logo.jpg file in BOTH $ORALCE_HOME/apex/images AND $ORACLE_HOME/apex3.2/Apex3.2Download/apex/images (since I did an upgrade to 3.2 and unsure which ApEx location it's exactly).
    2) changed Shared Components -> Application Definition -> Logo -> FROM #WORKSPACE_IMAGES#logo.jpg TO /i/logo.jpg
    And yes, /i/ is defined as an image prefix.
    However, the logo does NOT show up.
    Any idea?
    Thanks much,
    Helen

    First, how are you accessing APEX? Via Embedded Gateway or HTTP Server?
    When put the logo file into the "images" directory, did you do this on the Database Server, or Application Server?
    - If Embedded Gateway, the only way that files are served is through the APEX interface, unless you explicitly path them from a different web server (same host is fine, but different port obviously). It's via Embedded Gateway in 11g db. Currently the image is loaded into database, but I want to change to filesystem.
    So I
    1) put logo.jpg file in BOTH $ORALCE_HOME/apex/images AND $ORACLE_HOME/apex3.2/Apex3.2Download/apex/images (since I did an upgrade to 3.2 and unsure which ApEx location it's exactly).
    2) changed Shared Components -> Application Definition -> Logo -> FROM #WORKSPACE_IMAGES#logo.jpg TO /i/logo.jpg
    And yes, /i/ is defined as an image prefix.
    However, the logo does NOT show up.
    Any suggestions/ideas?
    Thanks,
    Helen

Maybe you are looking for

  • Safari will not open despite restart and reinstallation of OS.

    When I open safari, I cant access any menus (I just see the color wheel when I hover over any menus).  On activity monitor, Safari uses increasingly larger amounts of memory.  I have to force quit to get out of the application.  Ive restarted numerou

  • No sound after OSX 10.7.4 update

    Hi, I'm using the MBP 17" (2011) model. Everything works fine until I updated to OSX 10.7.4 I had read several comments about this issue, but still could not solve it. Detail: 1. The volume logo turned to gray, and it was locked 2. In symtem sound pr

  • Dataguard Interview questions and most frequeently asked DG issues

    Hi Gurus, I am new to this forum and happy to be a part of it. Can someone help me in posting " Dataguard Interview questions and most frequeently asked DG issues" as i am preparing for the interviews. And also share the enhancements to DG in 11g. Th

  • Object state not working if exported in PDF

    I'm working with Digital Publishing Suite and I have deeply appreciated the function "Object state". When used in connection with buttons and, eventually, the "Overlay Creator" it enables superb effects. I wonder about the fact that this helpful func

  • Phone wont sync

    When I try to sync my iphone to itunes it says device timed out?