Display 'no photo' in a JSP when photo is not present in DB

Hi All
I have stored an image in database uploded from the JSP. The DB has a BLOB column for the image. I have to display a single record at a time. I am able to display the image at the JSP also using <img> tag and specifying the JSP name fetching the image as the src attribute of the <img> tag.
My doubt is, if the image is not uploded for that record how to display some error message(like 'No Photo Uploaded') on the JSP page? and how can we also suppy a link to upload the photo, if already not uploaded. Since I am displaying the image as a part of another JSP having an <img> tag to display the image.
Could someone please help me??
Thanks & Regards
Inder Jeet Singh

Use an attribute to determine whether the record has a photo uploaded or not. Check the attribute value in the JSP and write the scriplet accordingly.
Example:
<% if (request.getAttribute("Photo") == null){
%> <TR>
     <TD align="center" colspan="2">
          <CENTER><IMG src="Photo Source here" height="250" width="375" align="middle">
          </CENTER>
     </TD>
</TR>
<% }else{
%>          
<TR>
     <TD align="right"><FONT size="1">Building Photo:</FONT></TD>
     <TD><INPUT type="submit" name="" value="Associate Photo" onclick="return buildingPhoto()"></TD>
</TR>
<% } %>     
In the above example I set the Photo attribute to null if there exists a photo.
Message was edited by:
srpunreddy

Similar Messages

  • E-mails sent from PC users the photos are not present

    When opening some e-mails sent from PC users the photos are not present anyone have the same situation.

    I have not had such a problem. Is the size of the message sufficient to actually contain photos, of might this be a case of embedded links to images on remote servers?
    Under the headers, is there any list of attachments?
    Ernie

  • Syn read file adapter throwing exception when file is not present directory

    Hi Team,
    Requirment is to check for a file is present in a soa directory .If present delete the existing and write a new one.
    Syn read file adapter is throwing errors when file is not present in the directory soa local.
    Any paramter we can add to skip this exception.
    any help is appreciated.
    Thanks all
    Swetha H.

    Hi:
    An alternative is that , before u try to read it, u make a list directory, and search for ur file, if it is not in the list, then u don't read; otherwise, u do.
    The list operation is part of the file adapter.
    hope this helps
    best

  • To display spanish characters on a JSP when the JSP is inside one portal

    Hi All,
    Previously, I had posted my query here that how to display spanish characters on a JSP screen.
    I got a solution that to add
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    to the JSP and to save the JSP in 'UTF-8'encoding format.
    This works well in case an individual JSP. But when I am adding the JSP to a web project consisting of many other JSP pages, its not working.
    Do I have to change anything else.
    Please help me if you have any suggestions. I am eagerly waiting for any response.
    Thanks in advance.

    I used to have a similar problem. I have jsp pages in braz. portugese and for these I have    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">When I tried setting the contentType to UTF-8, the way you wrote foreign characters didn't get submitted properly from input fields so I took it away, then everything worked correctly. Don't know why though.

  • Radio interface need to be disabled when antenna is not present?

    I have been informed within a training class that the radio interface of an access point should be disabled when an antenna is not present. The reason given was that it would protect the radio from being adversely affected (potetnial for irreparable conditions). Question: 1) Is this true? 2) If so, where can I find supporting documentation on CCO? (I have not been able to find corroboratory information.)

    Hi Vincent,
    Here is a doc that speaks to this issue ( I don't see this causing irreparable damage but, better safe than sorry :)
    Q. If you operate the radio but do not attach the antenna, can you damage the radio?
    A. Some radio equipment manufacturers specifically warn against the operation of radios without the attachment of the antenna. Operation without the antenna can damage the transmitter. Most pieces of amateur or commercial radio equipment carry this warning because the equipment operates at a much higher transmitter power. A failure to use a proper antenna or load causes a reflected wave standing wave ratio (SWR) that can damage the final amplifier stage. This final amplifier stage is the power amplifier (PA).
    For Cisco Aironet equipment, the transmitter power output is 100 milliwatts (mW) for the 350 Series and 30 mW for the 340 Series. Damage is unlikely, but possible. If you need to run the devices without antennae, turn the transmitter power down to 1.5 mW. Also, you can use a 50/52 ohm dummy load (attenuator) to be safe.
    From this good Q & A doc;
    http://www.cisco.com/en/US/products/hw/wireless/ps441/products_qanda_item09186a0080094d01.shtml#aps
    Hope this helps!
    Rob

  • Photo rotate not present in os4?

    I installed OS4 to my iphone thismorning, and everything is working okay. However, i read that you can rotate pictures in the Camera Roll, but the only options i have when i tap are "Email Photo", "MMS", "Assign to Contact" and "Use as Wallpaper".
    Am i missing something?
    Thanks,
    Nev

    looks like it was there in the beta version but somehow they skipped it in the final version..

  • Macbook Pro Retina Display shuts down at 20% battery when it's not plugged in.

    See above.
    I've tried the ideas listed here: http://support.apple.com/kb/HT3964, including resetting the SMC.
    Time to see my local Genius?

    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro 
    https://discussions.apple.com/community/mac_os?view=discussions
    http://www.apple.com/support/macbookpro

  • File Adapter: Fixed length file read fails when all data not present

    Hi
    We have a BPEL process that reads fixed length data files. It works fine when all the data elements are available in the file but fails with 'rejected:10002' when even a single data is missing.
    How to handle this situation in BPEL file adapter?
    Are we doing something wrong or is this a normal functionality.
    If yes, then is there any work around for this as this is a very usual business condition which may occur, where all data elements are not mandetory.
    fixedLength
    ==========
    2,3,3,2
    Data - Successful
    ============
    1234567890
    2345678901
    3456789012
    Data - Failed
    ===========
    1234567890
    2345678901
    345678901
    Thanks in advance
    Buddhadev

    Hi Naveen,
          Do check the following things,
    >>Note : I have been asked to give the Transport Protocol as "NFS" (Whether this is the problem???) I have summarized the complete details below. Please help me
           1.If your file resides on your local network/local computer give NFS(Network file system). if your file resides on a FTP location give FTP and also give the FTP log on parameters.
    Additional Parameters
    File_MT.fieldFixedLengths 10,10,5
    File_MT.fieldNames VendorNumber,VendorName,City
    File_MT.fieldSeparator
    File_MT..processFieldNames fromConfiguration 
           2.If this structure does not match with the input file structure the file adapter wont pick up the file. So check for the help document provided by SAP in the following path.
    help.sap.com  --> Documentation  --> SAPNetWeaver --> SAPNetWeaver '04 --> English --> process integration --> SAP Exchange Infrastructure --> connectivity --> Adapters --> File Adapter
           Your file contains three records
    V123456789 A123456789 Bosto
    V234567890 B123456789 Atlan
    V334587900 C123456789 Austi
    You have mentioned the fieldSeperator as space but there is no File_MT.endSeparator '/n'  which differentiates between each and every row (record).
            Parameters for Record set Structures mentioned in the sender adapter configuration does not match with the actual file structure .
            Try giving exact structures in the configuration of sender file adapter.
    regards,
    Aravindh.

  • Parent node showing in schema when child nodes not present

    I had several folks answer my questions on mapping from a flat file to an EDI 835 schema and I am down to just a couple of issues before I finish up. I have a conditional mapping issue that I have to solve before I can map the rest of the document. I am
    mapping three fields in a single non-repeating line in the flat file to a repeating segment in the 835. Basically I need to create a separate AMT_ClaimSupplementalInformation segment for each field in the flat file line. As you can see in the picture
    below I want to create a AMT_ClaimSupplementalInformation segment for CDISCOUNT, CINELIGIBLE and CALLOWED.
    You can see I have quite a bit of conditional logic attached to the three fields, but I have all three connected via a loop to the AMT_ClaimSupplementalInformation parent. I cannot attach the loop to the parent of the three fields because it only appears
    once in the file. And if I leave the loop out the AMT segments get stacked funny, like this:
    <AMT_ClaimSupplementalInformation>
    AMT1
    AMT1
    AMT2
    AMT2
    </AMT_ClaimSupplementalInformation>
    You can see how they should be stacked in the next pic.
    In some cases however, one of those fields may be blank so I will not need to create a AMT_ClaimSupplementalInformation segment for it. I was able to use some conditional mapping ideas you guys gave me using the Not-Equal and Value Mapping functoids, and
    that works great to keep blank child nodes from being created. However, Since I have a loop attached to the AMT_ClaimSupplementalInformation parent node it still creates an empty parent node even when the child nodes are not created. See the empty parent
    node in the pic below.
    Since looping functoids can only be attached to links I don't know how to make the parent node conditional.
    Any suggestions?
    Thanks.

    Boatseller, thanks for the tip. I did end up going the XSLT direction. It's a bit of a hack, but I'm using the following XSLT to eliminate empty nodes :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="@*|node()">
            <xsl:if test=". != ''">
                <xsl:copy>
                    <xsl:apply-templates select="@*|node()"/>
                </xsl:copy>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    I created a new map with the 835 schema on each side. I then created an XSLT file and pointed to it in the Custom XSLT Path property. It seems to work well. I call this map right after my FlatFile_To_835 map.
    I was hoping to use the scripting functoid with inline XSLT in the map so that I didn't have to worry about deploying the XSLT file(just another thing to keep up with in the future), but when I compile it I get the following error:
    The "Scripting" functoid has 1 input parameter(s), but 2 parameter(s) are expected.
    I'm wondering if I'm connecting the schemas incorrectly in the map:
    In any case, I'm past the empty nodes issue for now, which was a big roadblock. Now I have to deal with the CAS segments which are, as you said, a real pain. 
    Thanks for all of your input.

  • How to uninstall photoshop CC (32 and 64 bits) when it's not present in Programs and Features of Control Panel?

    Hello,
    I have successfully downloaded and installed Photoshop CC 2014 on my PC (Win8.1, 64bits) and I intended to uninstall Photoshop CC (both 32- and 64-bits version). Unfortunately Photoshop is absent of Programs and Features.
    Could you tell me how to proceed with unisntall? Thanks in advance.
    Cheers
    Olivier

    You can try to download  CC Cleaner Tool
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Select option for CS6/ creative cloud and select option for Photoshop CC , if listed.
    If you are getting up to date error , you can also try:
    CC desktop lists applications as "Up to Date" when not installed

  • Imbedded Images(photos) are not displayed in emails (yahoo7mail), its ok using IE9

    When opening emails, only the text is displayed any photos are not shown. Was ok with FF3 and works ok with IE9.
    Using Yahoo7mail.

    Hi  ,
    In fact, we upload pictures to Active Directory using the
    Import-RecipientDataProperty cmdlet. By default, thumbnailPhoto is included in the OAB as an Indicator attribute. This means the value of the attribute isn't copied to the OAB— instead, it simply
    indicates the client should get the value from Active Directory. If an Outlook client (including Outlook Anywhere clients connected to Exchange using HTTPS) can access Active Directory, the thumbnail will be downloaded and displayed. When offline, no thumbnail
    downloads.
    And please check the if lync client chosen Default corporate picture .
    The following articles for your reference.
    Lync 2010, Exchange 2010, SharePoint 2010, and Office 2010 Integration: Part 1
    http://blogs.technet.com/b/drrez/archive/2011/04/26/lync-2010-exchange-2010-sharepoint-2010-and-office-2010-integration-part-1.aspx
    GAL Photos in Exchange 2010 and Outlook 2010:
    http://blogs.technet.com/b/exchange/archive/2010/03/10/gal-photos-in-exchange-2010-and-outlook-2010.aspx
    Wendy Liu
    TechNet Community Support

  • My edited photos will not display when clicked on, a large triangle with exclmation comes up

    my edited photos will not display when clicked on, instead a large grey area comes up wiht a triangle /exclamation sign. 

    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download <a href="http://www.fatcatsoftware.com/iplm/"><b><u>iPhoto Library Manager</b></u></a> and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new *iPhoto 08* library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption. 

  • Using iPad2, when receive photo in e-mail it displays OLD photo instead.

    Using iPad2, when receive photo in e-mail it now displays OLD photo that had been received and saved instead. Why and how to rectify?

    This problem only applies when attempting to receive photos that were sent in special format from iPhoto.  No problem receiving photos sent as attachment to normal e-mail.

  • Iphone camera effects display in photo album but disappear when you open the photo itself. why is this ?

    iphone camera effects display in photo album but disappear when you open the photo itself. why is this ?

    Hi Cyclosaurus,
    Thank you for your reply. Sorry to bug you again but can I ask some further questions? Pls excuse my lack of knowledge on these things.
    In relation to your points:
    1) In the ftp publishing settings, public_html is acutal in where it says "site name", where it says "URL" I have http://www.gippmed.com. I was advised to put public_html in "site name" from my hosting. If I put anything else it publishes the entire site to a folder with that name on the server and is not viewable online?
    2) I have removed the spaces in the album page name and will reupload soon. In relation to the image file names, am I correct in saying that iweb is naming them from the captions? Do you really have to use one word captions or use underscores, it looks a little odd? I have read troubleshooting articles about iweb and spaces and it also recommends similar as you are, suggesting that all page names should have underscore instead of spaces. Problem is, if for example I change the page name "About Me" to "About_Me" iweb automatically changes it in the navigation menu and this looks silly to have undescores in the Nav Menu. Is there a way around this?
    Lastly, a new problem that I have never had before:
    Previously, iweb would remember what I had published and only publish new site changes. Now, every time I turn my computer off and on, I open iweb and it doesn't recognise any of the previous publishing, ie it republishes the entire site.
    Thank you again for your help

  • When i go to attach a photo to email or load it to facebook it will not display any photos from my iphoto library and only allows me load ones that are in photo booth or saved on the desktop. Any ideas?

    when i go to attach a photo to email or load it to facebook it will not display any photos from my iphoto library and only allows me load ones that are in photo booth or saved on the desktop. Any ideas what is wrong?

    when i go to attach a photo to email or load it to facebook it will not display any photos from my iphoto library and only allows me load ones that are in photo booth or saved on the desktop. Any ideas what is wrong?

Maybe you are looking for

  • Sharing/working on the same files?

    Sorry if this is rookie question, but I'm in the US and my buddy's in Scotland. Is there a way we can share GB files, work on them and send them to each other? I guess simultaneous recording is out of the question... thanks in advance. Jon

  • MaxL question

    Hi There, I have MaxL to load data into the essbase: import database Finance.Finance data connect as "password" identified by "password" using server rules_file FinanceRule on error write to "d:\\log\\hDataLoad.err" ; It works without any issue. But

  • Ken Burn pictures look really low quality

    Putting high quality pictures into movie and when I ad ken Burns affect they look very low quality as the effect is in process. Do I need to add a lower quality pic? Any suggestions would be very much appreciated. Keith

  • Acrobat X Security Settings Not Working

    I made a PDF portfolio with Acrobat X and set password security to not allow any changes. The document title says it is SECURED, but pages can still be extracted. What is going on? What did I miss?

  • HP and Cisco

    We have a client with a Nexus 5000 at the ToR. They want to start migrating to a blade server environment for their new cloud infrastructure. How does an HP blade server move FCoE traffic from a server CNA to the ToR? I need a definitive answer. I po