
com.ja.smarkdown.location.webapp.WebappDocumentProvider Maven / Gradle / Ivy
package com.ja.smarkdown.location.webapp;
import java.net.MalformedURLException;
import java.net.URL;
import javax.inject.Inject;
import javax.servlet.ServletContext;
import com.ja.smarkdown.location.AbstractUrlDocumentProvider;
import com.ja.smarkdown.model.config.Location;
public class WebappDocumentProvider extends
AbstractUrlDocumentProvider {
public WebappDocumentProvider() {
super("webapp:", "/");
}
@Inject
private ServletContext servletContext;
@Override
protected URL getUrl(final Location location, final String path)
throws MalformedURLException {
return servletContext.getResource(path);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy