How to avoid directory listing in java web applications.

how to avoid directory listing in java web applications.
That is on typing the url of the application it should not the directory listing. Welcome tag in web.xml doesnot fully solve the problem, since still the images folder etc is still accessible

I know of two ways.
If you're using tomcat and have access to the conf directory.
Edit your $TOMCAT/conf/web.xml. Find your default servlet properties and change
  <servlet>
    <servlet-name>default</servlet-name>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>listings</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>to  <servlet>
    <servlet-name>default</servlet-name>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>listings</param-name>
      <param-value>false</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>And restart your server. This will affect every directory on the server, and return a 405 directory browsing forbidden error.
Another way, is to place an index.jsp inside each directory with a simple one line redirect to your applications CONTEXT_PATH.response.sendRedirect("http://yourserver/yourapp/");This will only affect specific directories which contain these index.jsp files.
Hope this helps

Similar Messages

  • How to call Oracle Reports via Java Web Application ?

    Dear All,
    I have developed a web reports using Oracle Reports 11g and would like to display these reports via Java Web App that will call them.
    Kindly help me in this matter.
    Regards,
    Irfan

    i will go as John suggested.........Construct a URL with required parameters and call it using goLink component
    make a configuration in Report server and
    http://myServer:myport/reports/rwservlet?config=myconfig&destype=cache&desformat=PDF&report=myreport.jsp&myparameter=myvalue

  • Lion Server: How can I enable directory listing for the Web Server?

    The functionality was part of the Server App in Lion Server but was not included in Lion.  Can anyone shed some light on how to enable Directory Listing.  Any help is appreciated!

    Go to /etc/apache2 and edit the file 000_any_80_.conf
    using sudo nano command and replace  "-Indexes" with "+Indexes".
    Restart Apache with "sudo apachecrl restart"
    Good luck,
    Ricky
    from Costa Rica

  • Directory lister for the web.

    Hi
    Here iam attaching my project code for my particualr aplication
    The source code for a directory lister for the web. You give it
    one or more URLs as arguments and its not displays the formatted results .. can any body will help me
    import java.util.*;
    import java.net.*;
    import java.io.*;
    public class WebList extends abcd.Application
    static final String progName = "WebList";
    public static void main( String[] args )
    (new WebList()).compat( args );
    public int newMain( String[] args )
    int argc = args.length;
    if ( argc == 0 )
    usage();
    return -1;
    for ( int argn = 0; argn < argc; argn++ )
    if ( argc > 1 )
    if ( argn > 0 )
    out.println( "" );
    out.println( args[argn] + ":" );
    list( args[argn] );
    return 0;
    private void usage()
    err.println( "usage: " + progName + " URL ..." );
    void list( String urlStr )
    String base = abcd.Utils.baseUrlStr( urlStr );
    Enumeration as;
    try
    as = new abcd.Spider( urlStr, err );
    catch ( MalformedURLException e )
    err.println( e );
    return;
    while ( as.hasMoreElements() )
    URLConnection uc = as.nextElement();
    if ( uc == null )
    continue;
    URL thisUrl = uc.getURL();
    String thisUrlStr = thisUrl.toExternalForm();
    if ( thisUrlStr.startsWith( base ) )
    thisUrlStr = thisUrlStr.substring( base.length() );
    if ( thisUrlStr.length() == 0 )
    thisUrlStr = ".";
    String mimeType = uc.getContentType();
    int len = uc.getContentLength();
    long mod = uc.getLastModified();
    Date modDate = new Date( mod );
    String modDateStr = abcd.Utils.lsDateStr( modDate );
    out.println(
    abcd.Fmt.fmt( mimeType, 14, abcd.Fmt.LJ ) + " " +
    abcd.Fmt.fmt( len, 8 ) + " " +
    modDateStr + " " + thisUrlStr );
    try
    InputStream in = uc.getInputStream();
    in.close();
    catch ( IOException e ) {}
    }

    Hi,
    It is enumerating the files reachable at or
    below those URLs, i hope it will full fill your application requirements.
    and also in the for loop you have to do pre increment not post increment so it may be the casue for entier your logic ..
    as per my knowledge iam changing the code .. i hope it will work for your application...
    still if you have any querys please post me with details of your projects so that i can help you more..
    here is modified code:
    =================
    import java.util.*;
    import java.net.*;
    import java.io.*;
    public class WebList extends abcd.Application
    static final String progName = "WebList";
    public static void main( String[] args )
    (new WebList()).compat( args );
    public int newMain( String[] args )
    int argc = args.length;
    if ( argc == 0 )
    usage();
    return -1;
    for ( int argn = 0; argn < argc; ++argn )
    if ( argc > 1 )
    if ( argn > 0 )
    out.println( "" );
    out.println( args[argn] + ":" );
    list( args[argn] );
    return 0;
    private void usage()
    err.println( "usage: " + progName + " URL ..." );
    void list( String urlStr )
    String base = abcd.Utils.baseUrlStr( urlStr );
    Enumeration as;
    try
    as = new abcd.Spider( urlStr, err );
    catch ( MalformedURLException e )
    err.println( e );
    return;
    while ( as.hasMoreElements() )
    URLConnection uc = (URLConnection) as.nextElement();
    if ( uc == null )
    continue;
    URL thisUrl = uc.getURL();
    String thisUrlStr = thisUrl.toExternalForm();
    if ( thisUrlStr.startsWith( base ) )
    thisUrlStr = thisUrlStr.substring( base.length() );
    if ( thisUrlStr.length() == 0 )
    thisUrlStr = ".";
    String mimeType = uc.getContentType();
    int len = uc.getContentLength();
    long mod = uc.getLastModified();
    Date modDate = new Date( mod );
    String modDateStr = abcd.Utils.lsDateStr( modDate );
    out.println(
    abcd.Fmt.fmt( mimeType, 14, abcd.Fmt.LJ ) + " " +
    abcd.Fmt.fmt( len, 8 ) + " " +
    modDateStr + " " + thisUrlStr );
    try
    InputStream in = uc.getInputStream();
    in.close();
    catch ( IOException e ) {}
    Regards,
    TirumalaRao.
    Developer Technical support,
    sun MicroSystem, India.

  • How can make java servlet sent soap message to other java web application

    hello,
    i want to make simple servlet send soap message to other java web application containing web service????
    for example
    web application " A " contain web service add two number
    java servlet " B " send soap message contain num1 and num2 to A to add them.
    how can do this????

    I tried that but my problem is that the code is so old. At least what I saw. I don't know how old is too old and I'm trying to do things "right." I saw code from 1998, but I don't know if that's still what you do. It might still work, but that doesn't mean it's correct. There's so much out there on Java that so old that half the time I'm not sure what to do because some other technology in J2EE or the latest Java SDK might have come up with a new way to do things. Thanks.

  • How to avoid multiple listing for same artist?

    How to avoid multiple listing for same artist?

    Sounds like there might be blanks in the artist name.
    For instance "Lou Reed" and "Lou Reed_" will not match.
    (Pretend the underscore _ is a blank).
    Select all the Lou Reed songs, Get Info, and type "Lou Reed" in the artist field. That should fix it.

  • How to call Xcelsius in Java Web application without OpenDoc

    Hi,
    We require to call Xcelsius Dashboard from a Java Web application. We cann't use OpenDoc function as result of some client preferences/restrictions
    Please let me know, what would be the other method to call the Xcelsius Dashboard from a Web application.
    Regards,
    Sachin

    Xcelsius docs are in swf format.  You could probably just host them without security and view with flash.

  • Upgrading BOE XI R2 Java Web Applications to use BOE XI 3.1

    Hello,
    Does anyone know where I can get documentation about how to update Java Web Applications using BOE XI R2 to BOE XI 3.1? I search the documentation online and I couldn't find any.
    I believe that it should be a matter of just updating the Java Archve (JAR) files and the helper files in the 'crystalreportviewers' folder. There should not be any changes to how I use the Enterprise SDK, RAS and Viewers SDK. If there are any, there should be very few. I just want to make sure of this.
    Thanks,
    R.C.

    Hi,
    Upgrading the Jar files and viewers directory ( crystalreportviewers12) should be sufficient. Please refer to 3.1 Java developer guide for ,pre information.
    Thanks
    Aasavari

  • Integrating a Java web application into the SAP NetWeaver Portal

    Hello experts,
    We have a requirement to integrate a Java based web application into the SAP NetWeaver Portal using iView/iFrame technology. The Java based web application is completely independent from the SAP environment but should be displayed as part of the SAP Portal environment. The other requirement is the main navigation menu for the Java based web application should be configured and provided in the SAP Portal.
    Any pointers on how exactly this can be done would be of great help.
    Also how can the SSO (Single-Sign-On) to the Java application be implemented so that the user can logon to the java application through the portal without providing the user credentials again.
    Thanks in advance.

    Hi,
    I think you can use URL iviews to integrate your java web application with EP. you have the option of doing SSO with the application as well.
    Have a look at the sap help material
    http://help.sap.com/saphelp_nw04/helpdata/en/f5/eb51730e6a11d7b84900047582c9f7/frameset.htm
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CreateURLiviewintotheSAPEP+portal
    Regards,
    Ganesh N

  • Can't connect to Oracle XE instance from Java web application

    I'm a long-time Java developer but can't figure this out.
    I've been pouring over the forum for over a week and can't
    find the solution that will let me connect.
    Hardware: Intel/Vista.
    DB: Oracle Express 10G.
    Application: Java web application (Jakarta Struts)
    Application Server: Tomcat 5.5
    I copied the latest JDBC driver from OTN into my app server's "/LIB" directory.
    I get no driver errors. ("ojdbc14.JAR)"
    I can connect locally from my TOAD client, using SYSTEM/PASSWORD/XE.
    My listeners seem to be OK.
    Depending on which connection string I use from my Java application,
    I get one of two messages.
    "ORA-01017: invalid username/password; logon denied"
    OR
    "Io exception: The Network Adapter could not establish the connection"
    ------------ lsnrctl status ---------------------------------------------------
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...
    Service "xe" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...
    The command completed successfully
    ------------ SOURCE CODE ------------------------------------------------------
    OracleDataSource ods = new OracleDataSource();
    ods.setURL(" jdbc:oracle:thin:@localhost");
    conn = ods.getConnection("system", "password");
    //ods.setURL("jdbc:oracle:thin:@rsosborn-PC:1521:XE");
    //conn = ods.getConnection("system", "password");
    String query = "select * from books;";
    Statement st = conn.createStatement();
    ResultSet rs = st.executeQuery(query);

    Using the code you supplied I was able to reproduce your errors. I've adjusted it accordingly and can connect to one of my 10.2 test databases.
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.*;
    class Conn {
      public static void main (String args []) throws SQLException
        Connection conn = null;       
        OracleDataSource ods = new OracleDataSource();
        // ods.setURL(" jdbc:oracle:thin:@localhost:1521:TEST");
        // conn = ods.getConnection("scott", "tiger");
        ods.setURL("jdbc:oracle:thin:@localhost:1521:TEST");
        conn = ods.getConnection("scott", "tiger");
        Statement stmt = conn.createStatement();
        ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
        while (rset.next())
            System.out.println (rset.getString(1));   // Print col 1
        stmt.close();
    }There are several different ways to configure OracleDataSources:
    http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/urls.htm#BEIDBFDF
    So, hopefully it's just a mismatch config.

  • Call rfc from Java Web application.

    Hi:
    I am new to SAP Java programming.
    I am developing a java web application on SAP NW SP16.
    I need to call a rfc and process the data to be displayed on a jsp page.
    I have few questions...
    1) Can I use the JCO destination created in thru wed dynpro content administrator, to connect to sap and execute the rfc/bapi?
    2) How would I create and access the model (rfc)?
    3) Are the required jar and dll(rfc32.dll ... ) files available on the server?
    Any help would be greatly appreciated.
    Thanks.

    Hi,
       See the follwoing links which contains sample code to ceate JCO and execute BAPI.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    Kind Regards,
    S.Saravanan.

  • [ANN]REPORTMILL 5 BRINGS PDF AND FLASH TO JAVA WEB APPLICATIONS

    REPORTMILL 5 BRINGS PDF AND FLASH TO JAVA WEB APPLICATIONS
    Dallas, TX - February 25, 2002 - ReportMill Software, Inc. today announced the
    general availability of ReportMill 5 - the only developer tool in the world providing
    dynamic PDF and Flash web pages and reports for web applications. The new version
    is written entirely in Java and runs on all major platforms with support for all
    Java based web application servers, including those from BEA, IBM, Oracle, Sun
    and Apple.
    ReportMill rescues web developers from the crude look and feel that HTML-only
    solutions provide. By complimenting systems like Java Server Pages (JSP) from
    Sun, ReportMill brings a new level of professionalism and functionality to web
    applications.
    "Most web sites today offer much of their content in PDF and Flash, however, web
    applications are still limited to less-expressive HTML. Our customers deliver
    professionally formatted pages, such as invoices, catalogs, financial statements
    and itineraries in the paginated and printable Adobe PDF format. They offer content
    navigation that is interactive and portable in Macromedia Flash," says Jeff Martin,
    ReportMill CEO. "Only ReportMill seamlessly provides both with an integrated page
    layout application and an intuitive developer library."
    Availability and Pricing
    Available now. A fully functional evaluation version of the product is also available
    as a direct launch from your browser at http://reportmill.com/webstart.
    List pricing for ReportMill 5 starts at $495 (US) per developer and $4,995 (US)
    for a single processor deployment license. Volume pricing does apply. For specific
    pricing details, please see http://reportmill.com/pricing.html.
    About ReportMill Software, Inc.
    ReportMill Software, Inc. is the leader in web application "Object Reporting"
    and PDF and Flash content delivery for Java web applications. Founded in 1997,
    ReportMill has been the darling of the Apple WebObjects community, providing professional
    content solutions for dozens of fortune 500 corporations such as Merrill Lynch,
    Morgan Stanley, Fannie Mae, Verizon, WorldCom, NTT Communications, America Online,
    EDS, KPMG, AIG, Toyota and more. Now available to all web application servers,
    ReportMill will soon be a fixture in all web application development.
    Contact
    ReportMill Software, Inc.
    214.513.1636
    [email protected]

    REPORTMILL 5 BRINGS PDF AND FLASH TO JAVA WEB APPLICATIONS
    Dallas, TX - February 25, 2002 - ReportMill Software, Inc. today announced the
    general availability of ReportMill 5 - the only developer tool in the world providing
    dynamic PDF and Flash web pages and reports for web applications. The new version
    is written entirely in Java and runs on all major platforms with support for all
    Java based web application servers, including those from BEA, IBM, Oracle, Sun
    and Apple.
    ReportMill rescues web developers from the crude look and feel that HTML-only
    solutions provide. By complimenting systems like Java Server Pages (JSP) from
    Sun, ReportMill brings a new level of professionalism and functionality to web
    applications.
    "Most web sites today offer much of their content in PDF and Flash, however, web
    applications are still limited to less-expressive HTML. Our customers deliver
    professionally formatted pages, such as invoices, catalogs, financial statements
    and itineraries in the paginated and printable Adobe PDF format. They offer content
    navigation that is interactive and portable in Macromedia Flash," says Jeff Martin,
    ReportMill CEO. "Only ReportMill seamlessly provides both with an integrated page
    layout application and an intuitive developer library."
    Availability and Pricing
    Available now. A fully functional evaluation version of the product is also available
    as a direct launch from your browser at http://reportmill.com/webstart.
    List pricing for ReportMill 5 starts at $495 (US) per developer and $4,995 (US)
    for a single processor deployment license. Volume pricing does apply. For specific
    pricing details, please see http://reportmill.com/pricing.html.
    About ReportMill Software, Inc.
    ReportMill Software, Inc. is the leader in web application "Object Reporting"
    and PDF and Flash content delivery for Java web applications. Founded in 1997,
    ReportMill has been the darling of the Apple WebObjects community, providing professional
    content solutions for dozens of fortune 500 corporations such as Merrill Lynch,
    Morgan Stanley, Fannie Mae, Verizon, WorldCom, NTT Communications, America Online,
    EDS, KPMG, AIG, Toyota and more. Now available to all web application servers,
    ReportMill will soon be a fixture in all web application development.
    Contact
    ReportMill Software, Inc.
    214.513.1636
    [email protected]

  • Good exception handling policy for Java web application

    I'm looking for a good exception handling policy for Java web application. First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace();
    Then I found this Oracle page The Message-Driven Bean Class - The Java EE 6 Tutorial, which does just that. So now I'm confused. Is there a good page online for an exception handling policy for Java EE Web applications? I have a hard time finding one. I've read that you should not catch the Exception class. I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop. We have a loop which runs once a minute implemented using the Quartz framework. Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.

    I'm looking for a good exception handling policy for Java web application.
    If you have not done so I suggest you start by reviewing the several trails in The Java Tutorials.
    Those trails cover both HOW to use exceptions and WHEN to use them.
    This trail discusses  the 'controversy' you mention regarding 'Unchecked Exceptions'
    http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html
    Unchecked Exceptions — The Controversy
    Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.
    Why did the designers decide to force a method to specify all uncaught checked exceptions that can be thrown within its scope? Any Exception that can be thrown by a method is part of the method's public programming interface. Those who call a method must know about the exceptions that a method can throw so that they can decide what to do about them. These exceptions are as much a part of that method's programming interface as its parameters and return value.
    The next question might be: "If it's so good to document a method's API, including the exceptions it can throw, why not specify runtime exceptions too?" Runtime exceptions represent problems that are the result of a programming problem, and as such, the API client code cannot reasonably be expected to recover from them or to handle them in any way. Such problems include arithmetic exceptions, such as dividing by zero; pointer exceptions, such as trying to access an object through a null reference; and indexing exceptions, such as attempting to access an array element through an index that is too large or too small.
    Generally don't catch an exception unless you plan to HANDLE the exception. Logging, by itself is NOT handliing.
    First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace(); 
    That article, like many, has some good advice and some poor or even bad advice. You get what you pay for!
    I've read that you should not catch the Exception class.
    Ok - but all that does is indicate that a problem of some sort happened somewhere. Not very useful info. Java goes to a lot of trouble to provide specific exceptions for specific problems.
    I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop.
    If the exception is 'unknown' then maybe it NEEDS to 'stop all other customers from executing later on in the loop'.
    That is EXACTLY why you don't want to do that. You need to identify which exceptions should NOT stop processing and which ones should.
    Some 'unknown' exceptions can NOT be recovered and indicate a serious problem, perhaps with the JVM itself. You can NOT just blindly keep executing and ignore them without risking data corruption and/or the integrity of the entire system Java is running on.
    Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.
    No - not if you want a well-behaved system.
    Don't catch exceptions unless you HANDLE/resolve them. There are times when it makes sense to log the exception (which does NOT handle it) and then raise it again so that it gets handled properly later. Yes - I know that is contrary to the advice given in that article but, IMHO, that article is wrong about that point.
    If you have ever had to maintain/fix/support someone else's Java code you should already understand how difficult it can be to find WHERE a problem occurs and WHAT the exact problem is when exceptions are not handled properly.

  • How to upload documents to DMS from web application externally

    We have a webdynpro based J2EE application. We want to create a SAP DMS ( KPRO ) document using this web application externally.
    Any inputs on this scenario ?
    I am able to create similar using an ABAP report which reads the client file and create the DMS document using BAPI_DOCUMENT_CREATE.
    How do we achieve this using external web application ..
    Please HELP in this.
    Thanks..

    Hi Divya,
    Good day...!
    A custom UI component will berrequired to upload the data from a Flat File into CRM WEBUI.
    The View in this UI Component can have 2 fields lets say u2013  ID and File to Upload and a button 'upload'.
    When the UPLOAD button is clicked , the event u2018ONFILEUPLOADu2019 is triggered.
    A Javascript function u2018fileUpload()u2019 reads the Excel file and formats the data in the form of a long string with Line Breaks corresponding to each row in the excel file. This string is stored in a Hidden HTML form element u2018Excel_Datau2019.
    In the Event Handler for u2018ONFILEUPLOADu2019, the hidden form element u2018EXCEL_DATAu2019 is read and retrived.
      lv_file_data = request->get_form_field( name = lv_excel_data ).
      me->lv_id = request->get_form_field( name = lv_schema_id ).

  • How to enhance the context menu in Web Applications - BW 7.0

    We have to enhance the context menu of several Web Applications and,
    initially, we based our solution on the paper "How to enhance the
    context menu of Web Applications", from June, 2002, but the solution
    described on the paper refers to the BW version 3.0 and we need the
    solution for the BW version 7.0. The technical content described on the
    paper, version 3.0, is very different from the content of the version
    7.0, used by us. Is this feature available for the version 7.0?

    Hi,
    did you find a solution already?
    Thanks,
    Frank

Maybe you are looking for

  • I have trouble adding attachments to my emails in my yahoo-account - how do I fix this ? When I try the same files on a PC it does work...

    Since a few days I am no longer able to attach certain files (ppt, pdf, jpeg) in my emails on my yahoo-account.  I click the attach button, go to my file and select it - and then the signal keeps running and running, and the file doesn't attach.  Som

  • Can't connect wireless to internt

    I have a 2003 powerbook g4 12" AL. with panther mac OS X 10.3.9, with airport extream, a u-verse 3600hgv router. it has other wireless connections but I have to use ans ethernet cable to connect, I'm not a mac user, I got this from my daughter so I k

  • About extended accounting

    Hi all! I'm experimenting the usage of extended accounting mechanism at task level. Somebody of you could you tell me the meaning of the following fields? I've just found a list in the documentation without explanation. The fields are: EXD_TASK_MESSA

  • Potentially stupid question

    I work in a photography studio and I am relatively unfamiliar with InDesign, having just gotten the program myself. One of our clients is having a problem with our Photoshop files when they import them into InDesign.  We gave them a disk of images (j

  • Duplicates that aren't - why?

    Sometimes when I import into iPhoto, I get the "Want to import duplicates?" dialog which shows the two photos, and they are not duplicates at all. Not the same scene, not the same date, often not the same aspect ratio. FYI, I just went through a labo