Project

General

Profile

« Previous | Next » 

Revision 7554

Added by Jing Tao over 11 years ago

Add a file prefix to tell it is absolute path.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/MetacatIndexServlet.java
52 52
 */
53 53
public class MetacatIndexServlet extends HttpServlet {
54 54
    
55
    //Use the file prefix to indicate this is a absolute path.
56
    // seet http://www.docjar.com/docs/api/org/springframework/context/support/FileSystemXmlApplicationContext.html
57
    private static final String FILEPREFIX = "file:";
55 58
    /**
56 59
     * Initialize the servlet 
57 60
     */
......
61 64
        //System.out.println("the url is "+url);
62 65
        //System.out.println("the path is "+url.getPath());
63 66
        //System.out.println("the file is "+url.getPath());
64
        ApplicationController controller = new ApplicationController("/"+url.getFile());
67
        ApplicationController controller = new ApplicationController(FILEPREFIX+url.getFile());
65 68
        List<SolrIndex> list = controller.getSolrIndexes();
66 69
        //System.out.println("++++++++++++++++++++++++------------------- the size is  "+list.size());
67 70
    }

Also available in: Unified diff