KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > facelets > impl > DefaultResourceResolver


1 package com.sun.facelets.impl;
2
3 import java.io.IOException JavaDoc;
4 import java.net.URL JavaDoc;
5
6 import javax.faces.FacesException;
7 import javax.faces.context.FacesContext;
8
9 import com.sun.facelets.util.Resource;
10
11 public class DefaultResourceResolver implements ResourceResolver {
12
13     public DefaultResourceResolver() {
14         super();
15     }
16
17     public URL JavaDoc resolveUrl(String JavaDoc path) {
18         try {
19             return Resource.getResourceUrl(FacesContext.getCurrentInstance(),
20                     path);
21         } catch (IOException JavaDoc e) {
22             throw new FacesException(e);
23         }
24     }
25
26     public String JavaDoc toString() {
27         return "DefaultResourceResolver";
28     }
29
30 }
31
Popular Tags