All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ja.smarkdown.location.webapp.WebappDocumentProvider Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy