Images are not updated in jsp page

Hi experts,
I have developed a website for show events and display images of the event, when the user saves the title of the event and event content these things are go to database and at the same time i am creating a directory on the server in which user can upload manually(as user's demand).
but after pasting the images in the directory when i test for the image page, the content and title are shown(content and title are coming from database) but images are not, images are shown after minutes. I have checked that image's path are right. And when i type same path on the address box of my browser, it shows...
The requested resource (/xxxxn/image/NewsImg/xxxxxx) is not available.But after minutes, like 30 to 40 or after i restart my system, it is showning me.
I have disabled the page cache of my jsp pages.. but problem remain. i am using tomcat 6.0.26 for testing.
Please guide me how can i resolve this issue.
Thanks
Shams

Ha ha ha,
I have done it myself...
what i am doing is to, generate a random number by using random class and attach it with image's path like "url rewriting" technique. Like this:
Random ran = new Random();
String imgPath = "./img/img_file_name?" +ran.nextInt(99999);and pass this to the "img" element of html.
I think that this trick forces browser to recollect the data from server and not to use cached data.
But my question with experts is that... I have used on jsp page these code:
response.setHeader( "Pragma", "no-cache" );
response.setHeader( "Cache-Control", "no-cache" );
response.setDateHeader( "Expires", 0 );to tell browser not to catch my page, then why browser is caching my page??
Thanks
Shams

Similar Messages

  • Images are not coming  in jsp pages in linux os

    Hi,
    i done java/j2ee project in windows its working fine, when i deployed that project in linux. JSP pages images are not displaying..
    IDE--- eclipse.
    server--- tomcat.

    Doublecheck the image paths. They must either be relative to the current context or just absolute.

  • HT204053 My devices, iPad and iPhone, are not updating automatically with pages.  Any suggestions. They use to about one week ago.

    My devices, iPad and iPhone, are not updating automatically with pages.  Any suggestions. They use to update beautifully about one week ago.  I took my MacBook Pro to the Apple store for software issues, and I been having updating issues.  Little help please.....

    Welcome to the Apple community.
    Check all your devices still have documents and data syncing turned on in settings > iCloud and that iCloud is enabled at settings > Pages. If this doesn't help, reset documents & Data from a computer at...
    iCloud.com

  • Images are not displayed in Details Page of Open script

    I am trying to record a web application with open script.
    After recording the images are not displayed when playing back the script.
    Are there any option we have to enable to get the images.

    Hi
    As per default OpenScript will ignore any URL that contains an image, to change the filters you can:
    View -> OpenScript Preferences > Record -> HTTP Module -> Select the URL filters Tab to add/remove or edit any filters
    You can un-check the first one on the list to enable image recording.
    Regards
    Alex

  • Pictures are not displaying in jsp page

    hi everyone,
    i want to display background images in my jsp page
    also some other images which are not background images
    plz tell me the way that enables me to place images in my jsp page
    thanx

    <body background="pic/love.gif">
    <%
    --- jsp code
    out.println("<img src='pic/vijay.jpg' height='100' width='100'>");
    --- jsp code
    %>
    </body>

  • Export To HTML Images are not visible

    Hi All,
    I have an VS 2003 application and Crystal Reports 10.
    My windows services generates the Crystal Reports and export them to Disk. I my Web Application i have to list all the exported reports.
    Everything works file but when i view HTML exported report from my .aspx page, images are not visible on the page.
    Can anybody has the same issue?
    Thanks in advance

    Do you have crystalreportviewers10 directory ptoperly configued in your IIS?

  • BLOB image not shows in JSP page!!

    Hi Dear all,
    I had tried to configure how to show BLOB image to jsp page . The code are works fine and servlet works ok but image can not show only. can you help me that what need to be added. Please help me.
    Can any experts help me? BLOB image not shows in JSP page. I am using ADF11g/DB 10gR2.
    My as Code follows:
    _1. Servlet Config_
        <servlet>
            <servlet-name>images</servlet-name>
            <servlet-class>his.model.ClsImage</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>images</servlet-name>
            <url-pattern>/render_images</url-pattern>
        </servlet-mapping>
      3. class code
    package his.model;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.util.Map;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class ClsImage extends HttpServlet
      //private static final Log LOG = LogFactory.getLog(ImageServlet.class);
      private static final Log LOG = LogFactory.getLog(ClsImage.class);
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        System.out.println("GET---From servlet============= !!!");
        String appModuleName = "his.model.ModuleAssetMgt";//this.getServletConfig().getInitParameter("ApplicationModuleName");
        String appModuleConfig = "TempModuleAssetMgt";//this.getServletConfig().getInitParameter("ApplicationModuleConfig");
        String voQuery ="select ITEM_IMAGE from MM_ITEMIMAGE where IMAGE_NO = 'P1000000000006'" ;// 'P1000000000006' this.getServletConfig().getInitParameter("ImageViewObjectQuery");
        String mimeType = "jpg";//this.getServletConfig().getInitParameter("gif");
        //?IMAGE_NO='P1000000000006'
        //TODO: throw exception if mandatory parameter not set
        ApplicationModule am =
          Configuration.createRootApplicationModule(appModuleName, appModuleConfig);
          ViewObject vo =  am.createViewObjectFromQueryStmt("TempView2", voQuery);
        Map paramMap = request.getParameterMap();
        Iterator paramValues = paramMap.values().iterator();
        int i=0;
        while (paramValues.hasNext())
          // Only one value for a parameter is expected.
          // TODO: If more then 1 parameter is supplied make sure the value is bound to the right bind  
          // variable in the query! Maybe use named variables instead.
          String[] paramValue = (String[])paramValues.next();
          vo.setWhereClauseParam(i, paramValue[0]);
          i++;
       System.out.println("before run============= !!!");
        // Run the query
        vo.executeQuery();
        // Get the result (only the first row is taken into account
        System.out.println("after run============= !!!");
        Row product = vo.first();
        //System.out.println("============"+(BlobDomain)product.getAttribute(0));
        BlobDomain image = null;
        // Check if a row has been found
        if (product != null)
          System.out.println("onside product============= !!!");
           // We assume the Blob to be the first a field
           image = (BlobDomain) product.getAttribute(0);
           //System.out.println("onside  run product============= !!!"+image.toString() +"======="+image );
           // Check if there are more fields returned. If so, the second one
           // is considered to hold the mime type
           if ( product.getAttributeCount()> 1 )
              mimeType = (String)product.getAttribute(1);       
        else
          //LOG.warn("No row found to get image from !!!");
          LOG.warn("No row found to get image from !!!");
          return;
        System.out.println("Set Image============= !!!");
        // Set the content-type. Only images are taken into account
        response.setContentType("image/"+ mimeType+ "; charset=windows-1252");
        OutputStream os = response.getOutputStream();
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[4096];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
          //System.out.println("Set Image============= loop!!!"+(is.read(buffer)));
        os.close();
        // Remove the temporary viewobject
        vo.remove();
        // Release the appModule
        Configuration.releaseRootApplicationModule(am, false);
    } 3 . Jsp Tag
    <af:image source="/render_images" shortDesc="Item"/>  Thanks.
    zakir
    ====
    Edited by: Zakir Hossain on Apr 23, 2009 11:19 AM

    Hi here is solution,
    later I will put a project for this solution, right now I am really busy with ADF implementation.
    core changes is to solve my problem:
        byte[] buffer = new byte[image.getBufferSize()];
        int nread;
        vo.remove();
        while ((nread = is.read(buffer)) != -1) {
          os.write(buffer);
        }All code as below:
    Servlet Code*
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response) throws ServletException,
                                                             IOException {
        String appModuleName =
          "his.model.ModuleAssetMgt";
        String appModuleConfig =
          "TempModuleAssetMgt";
      String imgno = request.getParameter("imgno");
        if (imgno == null || imgno.equals(""))
          return;
        String voQuery =
          "select ITEM_IMAGE from MM_ITEMIMAGE where IMAGE_NO = '" + imgno + "'";
        String mimeType = "gif";
        ApplicationModule am =
          Configuration.createRootApplicationModule(appModuleName,
                                                    appModuleConfig);
        am.clearVOCaches("TempView2", true);
        ViewObject vo = null;
        String s;
          vo = am.createViewObjectFromQueryStmt("TempView2", voQuery);
        // Run the query
        vo.executeQuery();
        // Get the result (only the first row is taken into account
        Row product = vo.first();
        BlobDomain image = null;
        // Check if a row has been found
        if (product != null) {
          // We assume the Blob to be the first a field
          image = (BlobDomain)product.getAttribute(0);
          // Check if there are more fields returned. If so, the second one
          // is considered to hold the mime type
          if (product.getAttributeCount() > 1) {
            mimeType = (String)product.getAttribute(1);
        } else {
          LOG.warn("No row found to get image from !!!");
          return;
        // Set the content-type. Only images are taken into account
        response.setContentType("image/" + mimeType);
        OutputStream os = response.getOutputStream();
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[image.getBufferSize()];
        int nread;
        vo.remove();
        while ((nread = is.read(buffer)) != -1) {
          os.write(buffer);
        is.close();
        os.close();
        // Release the appModule
    Configuration.releaseRootApplicationModule(am, true);
    }Jsp Tag
    <h:graphicImage url="/render_images?imgno=#{bindings.ImageNo.inputValue}"
                                                        height="168" width="224"/>

  • Some images are not loading...including yahoo logo on search pages. Firefox 8.0

    most images are not showing up in browser....including yahoo logo on search result pages and icon images in gmail. I have uninstalled and reinstalled firefox.

    If images are missing then check that you aren't blocking images from some domains.
    *Check the permissions for the domain in the current tab in "Tools > Page Info > Permissions"
    *Check that images are enabled: Tools > Options > Content: [X] Load images automatically
    *Check the exceptions in "Tools > Options > Content: Load Images > Exceptions"
    *Check the "Tools > Page Info > Media" tab for blocked images (scroll through all the images with the cursor Down key).
    If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    Make sure that you do not block third-party images permissions.default.images
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *http://kb.mozillazine.org/Website_colors_are_wrong
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    There are also extensions (Tools > Add-ons > Extensions) and security software (firewall, anti-virus) that can block images.
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Page-embedded Javascript and uploaded images are not cached.

    Hello All,
    I was reading in Wiki APEX and I found this line mentioned as cons: "Page-embedded Javascript and uploaded images are not cached".
    The question that I have posted many questions here how to enable the cache for Images and Javascripts but didn't get it right, is the wiki info right about the cache for images and JS?
    thanks,
    Fadi.

    Look at the bottom of this page as well [http://carlback.blogspot.com/2007/12/apex-and-3rd-party-js-libraries.html]
    Patrick Wolf
    Carl,
    the only drawback with #WORKSPACE_IMAGES# and #APP_IMAGES# is that it doesn't get cached by the browser. So each page request will transmit the hole file again. A caching option for the "Static Files" in the Shared Components would be nice :-)
    About lazy loading with the #WORKSPACE_IMAGES#. I could think about a mod_rewrite rule which translates the additional file request of the JS library into a valid request for APEX.
    Carl Backstrom
    In 3.1 we emit a last modified header now for uploaded files so that should help with browser caching.
    I wonder if anything's changed since then.
    Kofi

  • HT4972 Why Pages and numbers are not updating.

    My pages and numbers are not updating for about a week now Why?

    Some one else had a similar problem last night...same as yours. He claimed that Pages had been stuck trying to update for about week. I posted this and he said that it worked - which part he did not say - but give these things a try.
    Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
    If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>Store>Sign in and then try to resume the download.
    If you have all of your Pages files backed up in iTunes or on your Mac, this might be the answer. Try deleting the waiting icon - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again.
    I have deleted Pages a couple of times when I had issues with it and then reinstalled it. I even deleted a stalled Pages once and then tried the update successfully again after that. My files are always backed up in iTunes and on my Mac so I had no apprehension about deleting the waiting download.

  • Images are not loading - but work in Preview mode

    Hi -
    I was wondering if anyone can help me.  I'm kind of new to Dreamweaver and I can't seem to figure this out on my own. 
    I'm using Dreamweaver 8.  I developed a web page based on a template in which everything works perfectly in "Preview" mode on all browsers.  But when I uploaded the files to my remote hosting, the template based images (found in the "images" folder) are not loading on the page. The images that I added to the template myself, found in the same "images" folder ($200,000 in ..., and picture at bottom) are loading.  So some of the images in the images folder are loading some are not.
    I've checked the Images folder on the remote site, and they all seem to be there.  I've also checked for broken links, and I'm not getting any (I don't know if that would help w/ missing images or not, but I'm trying everything I can think of).  I also checked to see if there is a separate CSS style sheet, and there wasn't one supplied with the template (there is some CSS info in the code on the html page).  The image sizes are all small enough as well.  Can anyone help me with this? 
    You can view one of the pages at: http://www.200kin5months.com/squeeze-video.html
    Thank you in advance to anyone who might be able to help!
    Stacey
    PS - I've attached a screenshot from Dreamweaver Preview to show what it is supposed to look like.

    Your Web server is running on an operating system that is case-sensitive. You appear to have uploaded an Images folder, but not an images folder.
    You do not have a file here:
    images/squeeze-video_425x344_r9_c6.jpg
    But you do have a file here:
    Images/squeeze-video_425x344_r9_c6.jpg
    So you'll need to either change all your image/<whatever> links to point to Images/<whatever>, or upload another folder named images.
    Or, if you want to use a single folder, and if your local file system is not case-sensitive, you might be able to do it in DW's file panel. Here is a method that you might use to have all of them in a folder named images.
    BACK UP YOUR SITE FILES
    Rename Images to Foo (allow DW to update links)
    Rename Foo to images (allow DW to update links)
    Upload the images folder and any/all files that DW changed
    Delete the online Images folder
    HTH
    Mark A. Boyd
    Keep-On-Learnin' :-)

  • Images are not displayed in Cp7/SCORM/HTML5

    Hello, everyone.
    I am a Japanese Captivate7 user.
    Captivate7 is a good authering tool for us.
    I am belonging to some projects and using this tool.
    In project-A, we are making a SCORM1.2/HTML5 content incuding 150 pages, many images, many advanced actions, 10 quizzes but not including videos, sounds. In this content, some of images are not dislpayed on the specified slide (Quiz No.6 or 7), refer to Fig.1.
    Note : no images in green line
    In this time, HTML data between server and client is funny, PNG images are recognized as txt/html in server side. Normally, I think an image is recognized as image/html in server side.
    Refer to Fig.2
    This is issued in only Safari (IOS7,6 and Safari5.1.7).
    Please help me ASAP.

    Dear Vikram,
    Thank you for your reply.
    >Are you working on Windows or MAC ?
    Windows8
    >Make sure you have CP 7.0.1 update installed.
    CP 7.0.1.237
    >Does this issue (Images not appering) occurs when you open the CP 7 published output ? (On your computer, not on SCORM 1.2) ?
    Yes.
    C:\Program Files\adobe\Adobe Captivate 7 x64\utils\opt\win\pgnquant.exe
      ”ファイル名または拡張子が長すぎます。” --> Translated by me  : "File name or Extension is too long."
    >As you mentioned iOS7, are you viewing your content on iPAD or on MAC computers ?
    IOS7
    Other information:
    Our sever is based on CentOS : 2.6.32-431.1.2.0.1.el6.x86_64
    Moodle 2.6+ is also installed.
    Best Regards,

  • Help! Images are not rendering in any browser!

    When online, images are not rendering on any webpage. All other content is fine. Problem is across browsers, BUT, is limited to my user identity. When I create a new user and go online the problem id resolved. I do not want to lose all my user settings. Can anyone think of something I can do to troubleshoot this. Some file I may have deleted, some setting?

    Hi all, I am facing the same problems:
    Im using an UMTS card to connect to the internet.
    On various pages, no pictures are shown. The reason is, that my mobile carrier is using proxies to compress the pictures. Same thing worked fine, before updating to snow leopard. Now the pictures can show up. Safari says, that the pictures were not found.
    I tried the umts card on another computer, it worked fine, so t has to do with the update from Leo to Snow Leo....
    I already deleted the .plist, but it didnt solve the issue.
    Does anybody has an hint or solution??

  • Images are not shown after deploying in apps

    After deploying my application in apps i have put all my images in media folder even then the images are not displaying, can any tell me what is the reason for this, but when i have deployed before it was working fine...

    when the page is displayed without the image, right click on the image place holder and click on properties. Under General tab,
    address will show you the place/url page is looking for the image. Make sure you have put the image on that path and the name of image mathes the case as well.
    --Tanveer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Why aren't my FW (PNG) image are not showing up

    Hey guys.
    This is really bugging the hell out of me. I feel like I
    can't move on until i can figure out why my PNG images are not
    showing up in preview (F12). They did yesterday before I deleted
    some pages and renamed old pages I no longer needed.
    All my images that was done in FW are in my root folder in
    the file panel. i didn't move any of those. When I double click on
    the image to bring up the "select image source" in the URL it
    starts off with two periods then a slash and then the name of where
    it's located as well as the name of the image. The "relative to":
    is site root. i didn't change any of these setting before I deleted
    and renamed pages in my file panel.
    Oh, and my Ap Divs show up in light gray boxes.
    Please help!
    CS3 Mac

    I'm confused by the subject line! Is this like 'all of your
    base are belong
    to us?' 8)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Dooza" <[email protected]> wrote in message
    news:gki5he$3pu$[email protected]..
    > Why_ATL wrote:
    >> Hey Alan
    >> is the filename exactly what it should be? YES
    >> Are these .png files for web use, or are they PNG
    fireworks original
    >> files
    >> which are very large in file size because they
    contain all the info on
    >> layers and such? They are .png files for the web. I
    can't figure out why
    >> my Div is showing up in preview instead of my images
    There just Div's
    >> with the little blue question mark.
    >>
    >> This is getting harder and harder. I'm trying to
    laugh so i don't get a
    >> head ache over this. This is weird.
    >
    > Without a link we can only make wild stabs in the dark.
    >
    > Dooza

Maybe you are looking for

  • Error in the configuration for sap logon tickets

    Hi Forum, I use Tcode crmd_order_bp to see the BP cockpit and the error message displays as <b>Error in the configuration for SAP logon tickets</b> But if I click "Yes", system displays cockpit. How can I avoid this error. Thanks in advance Regards S

  • Possible to boot Win from an external drive?

    I've recently replaced my original drive with both Mac OS X and a small partition for windows installed. My windows partition is now on an external drive: the only difference is, i'ts now connected via USB instead of the internal SATA connector. (I c

  • Dynamic User update issue on LMS 3.2

    Win2008 VM: 1. Campus Manager 5.2.1 2. CiscoView 6.1.9 3. CiscoWorks Assistant 1.2.0 4. CiscoWorks Common Services 3.3.0 5. Device Fault Manager 3.2.0 6. Integration Utility 1.9.0 7. LMS Portal 1.2.0 8. Resource Manager Essentials 4.3.1 hello Setup D

  • JDeveloper Auto-Deploy to Weblogic Timer Manger Error

    Hi, I'm attempting to deploy my ADF application from JDeveloper to my WebLogic server but when I do I get the following error: java.lang.IllegalArgumentException: Existing timer manager has different work manager. TimerManager requested: [email prote

  • Report in multiple pages

    Hi Gurus, I have an xml file in the below format. I can have multiple records in the xml file. I have created the template. But when i preview the data, i'm not able to see the record in seperate pages. Any help would be appreciated. <?xml version="1