Getting an image path & display an image  in JSp

hi
How to get image & particular image path stored in Database .in Jsp [ Image stored in anther drive ( D:\images) ]
& my webroot dir in c:\apachetomcat\webapps....
Any Help will be Appriciated
[email protected]

Crossposted in 10 forums.

Similar Messages

  • Getting an image path & display an image  in JSp--webserver

    hi
    How to get image & particular image path stored in Database .in Jsp [ Image stored in anther drive ( D:\images) ]
    & my webroot dir in c:\apachetomcat\webapps....
    Any Help will be Appriciated
    [email protected]

    Crossposted in 10 forums.

  • Image path displays instead of image

    Firefox v20.0.1, Win7 32 bit.
    This web page ( http://zone.ni.com/devzone/cda/epd/p/id/5336 ) does not display the "flowchart"image at the bottom of the page immediately following the text "The following is a map of other documents..." On a correctly working page, the image is a flowchart "navigation" image that opens new pages depending on where you click on it. In firefox only a box with an ftp path to the image is displayed in its place. I have seen the problem on other web pages as well.
    Actions taken:
    The pages displays correctly in IE v10. This problem happens on one computer. Different computer, same firefox version displays correctly. Different computer older firefox version (v17?) displays correctly.
    * I have tried disabling all plug-ins and extensions.
    * I have created a new profile. Seems like the first time I did this, the page displayed correctly, but when I refreshed (F5) the image is gone and the ftp path box is displayed. Subsequently created new profiles do not display the page correctly.
    * I have tried resetting Firefox and the page still is not displayed correctly.
    Troubleshooting:
    Ctrl-shif-K, opened the Web Console, cleared the console output, refreshed the page by pressing Ctrl-F5. The following is several lines following the first error on the console:
    [09:12:29.360] Unknown property '-moz-border-radius'. Declaration dropped. @ http://zone.ni.com/widgets/share/addthis/1.0/css/share.css:11
    [09:12:29.360] Expected declaration but found '*'. Skipped to next declaration. @ http://zone.ni.com/widgets/share/addthis/1.0/css/share.css:13
    [09:12:29.406] GET http://ct1.addthis.com/static/r07/core076.js [HTTP/1.1 200 OK 167ms]
    [09:12:29.392] Unknown property 'size'. Declaration dropped. @ http://zone.ni.com/css/global/us/zoneprint.css:15
    [09:12:29.392] Expected declaration but found '@bottom-center'. Skipped to next declaration. @ http://zone.ni.com/css/global/us/zoneprint.css:17
    [09:12:29.497] GET http://zone.ni.com/css/global/us/thecore.css [HTTP/1.1 200 OK 26ms]
    [09:12:29.452] Expected identifier for class selector but found ' '. Ruleset ignored due to bad selector. @ http://zone.ni.com/css/global/us/thecore.css:115
    [09:12:29.453] Error in parsing value for 'filter'. Declaration dropped. @ http://zone.ni.com/css/global/us/thecore.css:259
    [09:12:29.453] Error in parsing value for 'cursor'. Declaration dropped. @ http://zone.ni.com/css/global/us/thecore.css:259
    Any help is greatly appreciated.

    You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.
    Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make a note of those passwords and bookmarks.
    You can't recover from this 'forget' unless you have a backup of the affected files.
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

  • How do I get a recordset to display three images horizontally?

    Hi,
    I'm using DWCS3 with MAMP.
    I want to display three images horizontally in a recordset. I have downloaded Tom Muck's extension horizontal looper and followed the instructions.
    However when I tried to add the recordset navigation bar I ran into some problems.
    If I add a repeat region to Tom Muck's extension then the page doesn't load.
    If I don't add a repeat region to Tom's extension everything works really well except only one image displays rather than three.
    Here is all of my code for the page. 
    Could someone help me please.
    <?php require_once('Connections/connQuery.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_rshlimgs = 1;
    $pageNum_rshlimgs = 0;
    if (isset($_GET['pageNum_rshlimgs'])) {
      $pageNum_rshlimgs = $_GET['pageNum_rshlimgs'];
    $startRow_rshlimgs = $pageNum_rshlimgs * $maxRows_rshlimgs;
    mysql_select_db($database_connQuery, $connQuery);
    $query_rshlimgs = "SELECT * FROM image";
    $query_limit_rshlimgs = sprintf("%s LIMIT %d, %d", $query_rshlimgs, $startRow_rshlimgs, $maxRows_rshlimgs);
    $rshlimgs = mysql_query($query_limit_rshlimgs, $connQuery) or die(mysql_error());
    $row_rshlimgs = mysql_fetch_assoc($rshlimgs);
    if (isset($_GET['totalRows_rshlimgs'])) {
      $totalRows_rshlimgs = $_GET['totalRows_rshlimgs'];
    } else {
      $all_rshlimgs = mysql_query($query_rshlimgs);
      $totalRows_rshlimgs = mysql_num_rows($all_rshlimgs);
    $totalPages_rshlimgs = ceil($totalRows_rshlimgs/$maxRows_rshlimgs)-1;
    $queryString_rshlimgs = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_rshlimgs") == false &&
            stristr($param, "totalRows_rshlimgs") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_rshlimgs = "&" . htmlentities(implode("&", $newParams));
    $queryString_rshlimgs = sprintf("&totalRows_rshlimgs=%d%s", $totalRows_rshlimgs, $queryString_rshlimgs);
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <link href="styles/orderlist3.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="lightbox_assets/css/lightbox.css" type="text/css" media="screen" />
    <script src="lightbox_assets/js/prototype.js" type="text/javascript"></script>
    <script src="lightbox_assets/js/scriptaculous.js?load=effects" type="text/javascript"></script>
    <script src="lightbox_assets/js/lightbox.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    a:link {
    color: #999966;
    a:visited {
    color: #FFFFFF;
    a:hover {
    color: #006600;
    a:active {
    color: #666699;
    -->
    </style></head>
    <body class="oneColFixCtrHdr" onload="initLightbox()">
    <div id="container">
      <div id="header">
        <h1>Header</h1>
      <!-- end #header --></div>
      <div id="mainContent">
        <h3>Image catalog</h3>
        <p> </p>
        <table >
          <tr>
            <?php
    $rshlimgs_endRow = 0;
    $rshlimgs_columns = 3; // number of columns
    $rshlimgs_hloopRow1 = 0; // first row flag
    do {
        if($rshlimgs_endRow == 0  && $rshlimgs_hloopRow1++ != 0) echo "<tr>";
       ?>
            <td><p><a href="images/weddingprivate/mr_and_mrs_lowe_18_15.jpg" title="Mr and Mrs Lowe_18_15" rel="lightbox"><img src="<?php echo $row_rshlimgs['imagethumb_url']; ?>" alt="The bride to be getting ready" longdesc="http://The bride to be with her hairdresser" width="100" height="150" /></a></p>
                <p><?php echo $row_rshlimgs['caption']; ?> <img src="images/Untitled-1.gif" alt="spacer" width="170" height="1" /></p>
              <p> </p>
              <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                  <input type="hidden" name="cmd" value="_s-xclick" />
                  <input type="hidden" name="hosted_button_id" value="6782561" />
                  <table>
                    <tr>
                      <td><input type="hidden" name="on0" value="Sizes" />
                        Sizes</td>
                    </tr>
                    <tr>
                      <td><select name="os0">
                          <option value="6x4">6x4 £3.00 </option>
                          <option value="7x5">7x5 £5.00 </option>
                          <option value="12x8">12x8 £6.50 </option>
                        </select>
                      </td>
                    </tr>
                  </table>
                <input type="hidden" name="currency_code" value="GBP" />
                  <input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
                  <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
              </form></td>
            <?php  $rshlimgs_endRow++;
    if($rshlimgs_endRow >= $rshlimgs_columns) {
      ?>
          </tr>
    <?php
    $rshlimgs_endRow = 0;
    } while ($row_rshlimgs = mysql_fetch_assoc($rshlimgs));
    if($rshlimgs_endRow != 0) {
    while ($rshlimgs_endRow < $rshlimgs_columns) {
        echo("<td> </td>");
        $rshlimgs_endRow++;
    echo("</tr>");
    }?>
        </table>
        <table border="0">
          <tr>
            <td><?php if ($pageNum_rshlimgs > 0) { // Show if not first page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, 0, $queryString_rshlimgs); ?>"><img src="images/First.gif" border="0" /></a>
                  <?php } // Show if not first page ?>
            </td>
            <td><?php if ($pageNum_rshlimgs > 0) { // Show if not first page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, max(0, $pageNum_rshlimgs - 1), $queryString_rshlimgs); ?>"><img src="images/Previous.gif" border="0" /></a>
                  <?php } // Show if not first page ?>
            </td>
            <td><?php if ($pageNum_rshlimgs < $totalPages_rshlimgs) { // Show if not last page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, min($totalPages_rshlimgs, $pageNum_rshlimgs + 1), $queryString_rshlimgs); ?>"><img src="images/Next.gif" border="0" /></a>
                  <?php } // Show if not last page ?>
            </td>
            <td><?php if ($pageNum_rshlimgs < $totalPages_rshlimgs) { // Show if not last page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, $totalPages_rshlimgs, $queryString_rshlimgs); ?>"><img src="images/Last.gif" border="0" /></a>
                  <?php } // Show if not last page ?>
            </td>
          </tr>
        </table>
        <p> </p>
            <p> </p>
      <!-- end #mainContent --></div>
      <div id="footer">
        <p>Footer</p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    </html>
    <?php
    mysql_free_result($rshlimgs);
    ?>

    Hi Charles,
    Use [Dr%] Variable formula as =if(IsNull([Dr%]);0;[DR%])
    Here IsNull returns the Boolean value of variable [Dr%] if its true then inserts 0 else the percentage values of failed tests based on the  total number of assembly tests performed.
    I Hope this is what you want to achieve....
    Thanks....
    Pratik

  • Rollover image not displaying second image, please help me

    Hello,
    I am trying to get 4 buttons on my page to display one image and then when a mouse rollsover to display a second image.  I have created 8 images.  2 for each of the 4 buttons.
    http://caliberproductsinc.com/Caliber%20Marine/boatrollers.htm
    Here is my page.  The 4 buttons I am concerend with are the "questions, manuels brochure, news" at the bottom.  The image displayed is the first image the second "rollover" image is the same except our logo turns red.
    I placed them by using insert, image objects, rollover image.  I pointed the first to the image that you are seeing and the "rollover image" to the red version.  The first image shows up fine.  The second never shows up?  Can anyone tell me why?  What am I doing wrong?
    Thanks

    "...dry roted...."  - I assume you mean "dry rotted"?
    Anyhow, on line 35 of your code, change this -
    function MM_swapImgRestore() { //v3.0
    to this -
    function MM_swapImgRestore() { //v3.0
    That slash doesn't belong there.

  • Image button displaying single image

    Hi,
    I am getting multiple images from picture library and displaying in the Imagebutton to display.
    But Last image is getting displayed i.e. there are 3 images that i am getting from picture library.
    I am getting image 3 in the image button even though when i am assigning the value in the loop as below
    for(i=0;i<results.count;i++)
    ImageButton1.ImageUrl = SPContext.Current.Site.Url+"/"+"/"+item.Title.ToString()
    Please let me know if i am making any mistake.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi,
    My requirement is 
    To get images from Picture library and to display those images in the form of Image buttons.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

  • Selecting Tiled Images then Displaying the image

    I am looking for a good way to display a collection of images (jpg) tiled in a pane, then the user can click on one of the tiled images, and then the selected tiled image will then be displayed full size in a seperate pane.
    Before, I have done this by having buttons in a grid layout, and setting the button's ImageIcon in order to produce the tiled images. Then it is easy to implement the 'user clicks on tiled image, then image is displayed '.
    I am wondering if there is a better way to do this. Your help is much appreciated!

    Before, I have done this by having buttons in a grid layout, and setting the button's ImageIcon in order to produce the tiled images. Then it is easy to implement the 'user clicks on tiled image, then image is displayed '.Sounds good to me.

  • To get the absolute path of a file in JSP

    Hi,
    I want to include a HTML page in a jsp.The path of the jsp should not be hot coded.So that i can get the path from the jsp file i am running and then concat the correspondinghtml file name to the absolute path of the jsp file i am running.What can i do to get the absolute path of the jsp file.

    I dont know if there is a way to get the path of the current jsp - but you sure can get the path to your web application using the ServletContext's getRealPath() method and then if you have stored the html (say x.html) in a folder (called, say 'static') immediately under your application root,
    String contextPath = application.getRealPath("/"); //path to your application ctxt
    String htmlFilePath = contextPath.append("/static/x.html");ram.

  • How do I get picture control to display PNG images with transparent background?

    I have an image of a robot arm looking from the top with a transparent background and saved as PNG. When I drag the image directly to LabVIEW front panel, the image shows properly with the transparent background, but I want to manipulate it such as rotate the image. I used the Read from PNG.vi to read the image to a picture control, but the background isn't transparent anymore. Am I missing something?
    Please help.

    unclebump gets 5 stars for referring you to a document that I wrote. 
    Incidentally, I wrote it years back, for LabVIEW 7.0.  A couple of notes to summarize:
    The picture control doesn't "really" support transparency.  However, the image data type supports masking, and stores the alpha channel, if present in your image data.  So you use the "Create Mask By Alpha.vi" referenced in that document to mask out pixels whose transparency is above a certain level.  It does not support partial transparency.  You could try to implement your own blending algorithm based on the picture control's current pixel values, and the image data's RGB value and transparency value, but it would probably be very slow.
    Also, that VI ships with 8.0 and later.  I don't know if it's on the palettes but it lives here:  vi.lib\picture\picture.llb\Create Mask By Alpha.vi
    Good luck!

  • I am trying to set up virtual servers with Netscape Enterprise Server 3.6. Can get home page to display but images linked to the page won't display and links to other pages won't work.

     

    hi,
    If your home page of the virtual server is displayed then,you have set the virtual server properly.
    check the links and source of the images or directories in the HTML source code of the home page.
    this should solve ur problem. If not notify me.
    Regards
    T.Raghulan.
    [email protected]

  • How can I get my browser to display thumbnails, images, and the background?

    I've had this problem for months now. I've tried uninstalling and reinstalling, resetting, everything I could think of. However, the problem remains. The background is never there, thumbnails are never there, images are invisible. It's basically just shapes and text.
    Is there any way I can post a screenshot?

    I have posted a screenshot of what I mean.

  • I can't get the camera to display the image before taking the picture

    when I click on the camera button on my ipod, the screen is blank.  I can take pictures by clicking the side button, but i can't preview the picture on the screen before I take it.  The picture shows up in my pictures....

    Try the standard fixes:
    - Reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod

  • Why, since CS6 does DW now use ABSOLUTE image paths when dragging images into Design View from a folder in Finder?!

    While I am grateful the previous issue I had with not being able to drag files into design view at all (in CC and CC2014) was resolved.
    Guys (Adobe), seriously, if you're going to change the functioning of something that used to work just fine, at least supply a way for a user to revert to the old way... I absolutely loathe that I need a legacy version of DW to continue with my current workflow. Please put it back to the way it was, or at least allow a user to chose between the two behaviours.
    If there is a way to do this, without using the Site Manager (which still doesn't work from Finder even with relative to document selected), I would appreciate any guidance.
    As for using the Site Manager (before some smart guy suggests that I just use that) I do not wish to navigate to and create up to 20 "sites" a week and wait for DW to cache them all, when I am already in the folder with the image assets in Finder.
    Also before someone pipes up and says: "You shouldn't be diving sites in design view anyway", I don't... I develop many, many newsletters every week and the folder structure is such that navigation to the actual image folder using the Site Manager would be painful at best.
    I don't really like having to and replace all instances of "file:///Users/me/Work/company/Mailers/Year/wk14/mailer/dev/img/prod5.jpg". It is horrendously wasteful, time-wise.
    Thanks in advance for any helpful replies

    Sorry Murray, DW used to have an idea, my point is that since CS6 its developed a case of Amnesia.
    The "elements" are in the "root" folder as follows:
    newslettername.htm
    img
         imagename.jpg
    So the relative path would be <img src"img/imagename.jpg" />
    However since the change: <img src"file:///Users/me/work/Company/year/week/campaign/img/imagename.jpg" />
    Which is completely useless and needs to be corrected before I upload the html anywhere.
    As for using the site directory, I did answer that in my initial post. I use a laptop, I really don't want a site manager taking half my screen just so I can see the folder structure and navigate with that, especially since I am already at the files I need in Finder.
    Again, this is something that used to work just fine in previous iterations of DW, so I don't believe Adobe is incapable of fixing it nor am I being unreasonable asking for a choice for those that may find the local absolute paths useful in some way. All I want is to be able to chose not to use absolute paths when dragging from Finder.

  • Images not displaying in Images folder

    Morning all,
    RH 802 generating WebHelp.
    I've got some images in topics that do not appear in the Images folder (where I moved them all to). I think this used to work fine. My images are all there if I generate or if I check the Images folder in Windows Explorer. They seem to only be missing from the UI in RH.
    What file does RH use (if any) to hold the images?
    I tried Search but it seems broken as all searches returned 0 results.
    TIA,
    James

    Peter,
    Yep, that did it...for a while. One restart of RH.
    Actually I had to rename to a temporary name for all the images to show up, restart RH and rename to the original name again .
    And it seems the Images folder does not play nice with the .cpd file. I had to turn off the option under Tools > Options... and could not delete the .cpd file manually either.
    So I have either the Images folder up-to-date or I have a fresh .cpd file, not both.
    James

  • Display all images in a folder

    Hi I want to display all the jpg images stored in my images folder. Is there a way to do this in JSP, JSTL or Applets?

    Is this supposed to work?Next time you post code, please use [code] tags (try the [code] button when you post...)
    public String getCode() {
    File dir = new File ("http://localhost:8084/TesteFile/images");
    No, you don't make a file from a URL like that. The File object will have to be made to the machine's local file system. One way to do it is to get the real path for the images in a servlet, and pass it on to the bean or method doing this work... example:
    //in servlet - returns path to C:\local\Tomcat\webapps\TestFile\images
    //on windows machine with a servlet in the TestFile context...
      String imagesPath = getServletContext().getRealPath("/images");
      String[] getImageNames(imagesPath);
    //in the class/the method doing the work
      public String[] getImageNames(String imagesPath) {
        File dir = new File(imagesPath);
    Filtro f = new Filtro ();
    String [] lista= dir.list();To get the list of files that have the extension you want, do more like this:
        String[] lista = dir.list(new Filtro());
    for (int i=0; i < lista.length; i++) {
    code.concat(lista[i]); }
    return code;
    Not sure why you would want to concatenate all the file names together, but hey whatever...
    Class Filtro is shown below.
    public class Filtro implements FilenameFilter{
    /** Creates a new instance of Filtro */
    public Filtro() {
    public boolean accept(File dir, String fileName)
    ame) {
    fileName = fileName.trim().toLowerCase();
    return (fileName.endsWith("jpg") ||
    jpg") || fileName.endsWith("jpeg"));

Maybe you are looking for

  • Cookbook crm ic webclient 2007

    Hello, do anyone have the newst ic-webclient cookbook? where can i find it? i am just writing my diploma thesis about the new ic-webclient and need further informations. regards Taner

  • Slow printing networked 64 bit win 7

    I have read many many posts about this.  HOWEVER, I print directly to the printers.  Http via Cups. I can load my old XP machine as a VM on the windows 7 machine and it prints immediately!  What I have done so far; 1) Disabled items with netsh int tc

  • How to disable field validation when block is in query mode ?

    Hi, we use Jdev 11g TP3 and implemented a button to set a block of input fields in query mode. Some of this fields are mandatory. When performing an execute operation this mandatory fields are validated and the JS error message pops up. In query mode

  • Teststand 3.1 - current teststand

    After our IT-department now finally has decided to switch update from XP to windows 7, we now have to move our old teststations based on teststand 3.1 to the new OS.  So far we have used minimal modified sequential or batch models from 3.1. Is there

  • Function u2013 transaction lost where synchronize PFCG and ERM

    Hi Gurus, Iu2019m working on Access Control Role Management 5.3 and when I synchronize ERM with PFCG I lost the Function u2013 transaction relationship in ERM role. Is It normal? Anybody know if I can recover it? Maybe forcing some table in the ERM D